You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Bill Jordan <bi...@hmonline.com> on 2005/05/02 21:26:11 UTC
Only getting one page of a multi-page output
Hello all,
I have a simple stylesheet that outputs the contents of a single tag to
a page. When the contents of the tag fit on a single page, everything
is fine. When the tag contents are too much to fit on one page, the
output contains only the first page. How can I get multipage output?
My stylesheet follows:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="pagemaster1"
page-height="792.0pt" page-width="612.0pt">
<fo:region-body margin-left="10pt" margin-top="10pt"
margin-bottom="10pt" margin-right="10pt">
</fo:region-body>
<fo:region-before extent="10pt" precedence="true"/>
<fo:region-after extent="10pt" precedence="true"/>
<fo:region-start extent="10pt" precedence="false"/>
<fo:region-end extent="10pt" precedence="false"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="note-pages">
<fo:repeatable-page-master-reference
master-reference="pagemaster1" maximum-repeats="10"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="note-pages">
<fo:flow flow-name="xsl-region-body">
<fo:block/>
<!-- Note -->
<fo:block-container position="absolute" top="30pt" left="10pt"
height="772.0pt" width="592.0pt" border-width="1.0pt"
display-align="before">
<fo:block span="none" white-space-collapse="false" color="#000000"
font-family="Courier" font-size="10.0pt" font-weight="bold"
text-align="start">
<xsl:value-of disable-output-escaping="no" select="note:body"/>
</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
Thanks,
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Only getting one page of a multi-page output
Posted by Bill Jordan <bi...@hmonline.com>.
J.Pietschmann wrote:
Why do you think you need an absolutely positioned block
container?
I think I need an absolutely positioned block container because I am a
rookie and I don't know any better. If you could steer me in the right
direction, I would be very grateful.
Thanks for your help,
Bill
J.Pietschmann wrote:
> Bill Jordan wrote:
>
>> <fo:block-container position="absolute" top="30pt" left="10pt"
>
>
> The content of an absolutely positioned block container is
> not broken across multiple pages. Everything not fitting
> into the space allocated by the container will overflow
> (FOP doesn't implement clipping).
>
> Why do you think you need an absolutely positioned block
> container?
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Only getting one page of a multi-page output
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Bill Jordan wrote:
> <fo:block-container position="absolute" top="30pt" left="10pt"
The content of an absolutely positioned block container is
not broken across multiple pages. Everything not fitting
into the space allocated by the container will overflow
(FOP doesn't implement clipping).
Why do you think you need an absolutely positioned block
container?
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Only getting one page of a multi-page output
Posted by Bill Jordan <bi...@hmonline.com>.
Works like a champ! Thanks, Jay.
Bill
JBryant@s-s-t.com wrote:
>Assuming that you really want just a page (or more) with the content of
>your one element in a block that has a border, the FO can be as simple as
>this:
>
><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="only" margin-top="1in"
>margin-left="1in" margin-right="1in" margin-bottom="1in">
> <fo:region-body region-name="only"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="only">
> <fo:flow flow-name="only">
> <fo:block border="1pt solid black"><xsl:value-of
>select="note:body"/></fo:block>
> </fo:flow>
> </fo:page-sequence>
></fo:root>
>
>Adjust the margins and border width to suit and you're good to go. Of
>course, you CAN add all kinds of things (a font other than the default,
>page number in the footer, etc.), but this file will produce a simple
>document that has a border around the content. I tested this file with FOP
>and a largish element and got four pages, each with a border around the
>page's content.
>
>HTH
>
>Jay Bryant
>Bryant Communication Services
>(presently consulting at Synergistic Solution Technologies)
>
>
>
>
>
>Bill Jordan <bi...@hmonline.com>
>05/02/2005 02:26 PM
>Please respond to
>fop-users@xmlgraphics.apache.org
>
>
>To
>fop-users@xmlgraphics.apache.org
>cc
>
>Subject
>Only getting one page of a multi-page output
>
>
>
>
>
>
>Hello all,
>
>I have a simple stylesheet that outputs the contents of a single tag to
>a page. When the contents of the tag fit on a single page, everything
>is fine. When the tag contents are too much to fit on one page, the
>output contains only the first page. How can I get multipage output?
>My stylesheet follows:
>
><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="pagemaster1"
>page-height="792.0pt" page-width="612.0pt">
> <fo:region-body margin-left="10pt" margin-top="10pt"
>margin-bottom="10pt" margin-right="10pt">
> </fo:region-body>
> <fo:region-before extent="10pt" precedence="true"/>
> <fo:region-after extent="10pt" precedence="true"/>
> <fo:region-start extent="10pt" precedence="false"/>
> <fo:region-end extent="10pt" precedence="false"/>
> </fo:simple-page-master>
> <fo:page-sequence-master master-name="note-pages">
> <fo:repeatable-page-master-reference
>master-reference="pagemaster1" maximum-repeats="10"/>
> </fo:page-sequence-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="note-pages">
> <fo:flow flow-name="xsl-region-body">
> <fo:block/>
>
><!-- Note -->
>
><fo:block-container position="absolute" top="30pt" left="10pt"
>height="772.0pt" width="592.0pt" border-width="1.0pt"
>display-align="before">
><fo:block span="none" white-space-collapse="false" color="#000000"
>font-family="Courier" font-size="10.0pt" font-weight="bold"
>text-align="start">
><xsl:value-of disable-output-escaping="no" select="note:body"/>
></fo:block>
></fo:block-container>
>
>
> </fo:flow>
> </fo:page-sequence>
></fo:root>
>
>Thanks,
>
>Bill
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Only getting one page of a multi-page output
Posted by JB...@s-s-t.com.
Assuming that you really want just a page (or more) with the content of
your one element in a block that has a border, the FO can be as simple as
this:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="only" margin-top="1in"
margin-left="1in" margin-right="1in" margin-bottom="1in">
<fo:region-body region-name="only"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="only">
<fo:flow flow-name="only">
<fo:block border="1pt solid black"><xsl:value-of
select="note:body"/></fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Adjust the margins and border width to suit and you're good to go. Of
course, you CAN add all kinds of things (a font other than the default,
page number in the footer, etc.), but this file will produce a simple
document that has a border around the content. I tested this file with FOP
and a largish element and got four pages, each with a border around the
page's content.
HTH
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)
Bill Jordan <bi...@hmonline.com>
05/02/2005 02:26 PM
Please respond to
fop-users@xmlgraphics.apache.org
To
fop-users@xmlgraphics.apache.org
cc
Subject
Only getting one page of a multi-page output
Hello all,
I have a simple stylesheet that outputs the contents of a single tag to
a page. When the contents of the tag fit on a single page, everything
is fine. When the tag contents are too much to fit on one page, the
output contains only the first page. How can I get multipage output?
My stylesheet follows:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="pagemaster1"
page-height="792.0pt" page-width="612.0pt">
<fo:region-body margin-left="10pt" margin-top="10pt"
margin-bottom="10pt" margin-right="10pt">
</fo:region-body>
<fo:region-before extent="10pt" precedence="true"/>
<fo:region-after extent="10pt" precedence="true"/>
<fo:region-start extent="10pt" precedence="false"/>
<fo:region-end extent="10pt" precedence="false"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="note-pages">
<fo:repeatable-page-master-reference
master-reference="pagemaster1" maximum-repeats="10"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="note-pages">
<fo:flow flow-name="xsl-region-body">
<fo:block/>
<!-- Note -->
<fo:block-container position="absolute" top="30pt" left="10pt"
height="772.0pt" width="592.0pt" border-width="1.0pt"
display-align="before">
<fo:block span="none" white-space-collapse="false" color="#000000"
font-family="Courier" font-size="10.0pt" font-weight="bold"
text-align="start">
<xsl:value-of disable-output-escaping="no" select="note:body"/>
</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
Thanks,
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org