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 "Chakravarty, Abhishek" <Ab...@accidentfund.com> on 2008/12/12 20:53:09 UTC
Force page break to skip immediate next page and continue writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
I tried moving the <fo:page-sequence master-reference="blank-page">
and <fo:page-sequence master-reference="simple"> into the
fo:layout-master-set but this time around I am getting stuck with the
error as fo:page-sequence is not a valid child element of
fo:layout-master-set.
I even tried moving the <fo:page-sequence-master master-name="document">
into the fo:layout-master-set and keeping the other fo:page-sequence
master-reference(s) as the same but then I am back to the same error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
________________________________
From: Barry Whiting [mailto:barry_whiting@londonmarketing.com]
Sent: Monday, December 15, 2008 11:17 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Try putting your fo:page-sequence-master node in the
fo:layout-master-set
Thanks
Barry
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: 15 December 2008 15:22
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I tried to use a second simple page master now however I am getting
stuck with the error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
The updated stylesheet is below. Please tell me what exactly am doing
wrong over here
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body />
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="blank-page">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/footer"/>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
</xsl:template>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.16/1842 - Release Date:
14/12/2008 12:28
RE: Force page break to skip immediate next page and continue writing on third page
Posted by Barry Whiting <ba...@londonmarketing.com>.
Try putting your fo:page-sequence-master node in the
fo:layout-master-set
Thanks
Barry
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: 15 December 2008 15:22
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I tried to use a second simple page master now however I am getting
stuck with the error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
The updated stylesheet is below. Please tell me what exactly am doing
wrong over here
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body />
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="blank-page">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/footer"/>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
</xsl:template>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. L
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.16/1842 - Release Date:
14/12/2008 12:28
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
I eventually did manage to get by this problem. The way out was to
enforce an extent = 0 for the region body when it came to printing page
2. Also to ensure that there was always a page 2 irrespective of whether
the region body overflowed (from page 1 or not) or not was having the
force-page-count = even.
Refer to the xsl below
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:page-sequence-master
master-name="SIMPLE" >
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="FRONT"
odd-or-even="odd"
master-name="FRONT" />
<fo:conditional-page-master-reference master-reference="BACK"
odd-or-even="even"
master-name="BACK" />
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
<fo:simple-page-master
master-name="FRONT" page-height="28.5cm" page-width="21.6cm"
margin-top="1.5cm" margin-bottom="0cm" margin-left="0.5cm"
margin-right="0.5cm">
<fo:region-body extent="9cm" margin-top="11cm" margin-bottom="3cm"/>
<fo:region-before extent="8cm" margin-top="1cm"/>
</fo:simple-page-master>
<fo:simple-page-master
master-name="BACK" page-height="28.5cm" page-width="21.6cm"
margin-top="1.5cm" margin-bottom="0cm" margin-left="0.5cm"
margin-right="0.5cm">
<fo:region-body extent="0cm" margin-top="14cm" margin-bottom="13cm"/>
<fo:region-after extent="15cm" margin-top="6cm" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence
master-reference="SIMPLE" force-page-count="even"
initial-page-number="auto-odd">
<fo:static-content
flow-name="xsl-region-before" font-family="Helvetica">
<fo:block>
HEADER</fo:block>
</fo:static-content>
<fo:static-content
flow-name="xsl-region-after" font-family="Helvetica" >
<fo:block
>Footer</fo:block>
</fo:static-content>
<fo:flow
flow-name="xsl-region-body">
<fo:table height="4cm"
width="5cm" table-layout="fixed" >
<fo:table-body>
<xsl:for-each select="data/table/record">
<fo:table-row>
<fo:table-cell>
<fo:block>row</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Tuesday, December 16, 2008 11:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes. I had gone through the mailing list as well but was hoping that
this had been fixed since then. Unfortunately that does not seem to be
the case. :-(
Thanks Eric, Jeremias and Barry for all those inputs.
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Tuesday, December 16, 2008 8:37 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I found this in the mailing list archives, for what it's worth....
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Friday, June 15, 2007 1:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: flow does not map to the region-body error
Well, as the error message says, FOP doesn't support that, yet. FOP
currently expects that the flow-name of the fo:flow maps to the
region-body in the simple-page-master.
If it were:
<fo:flow flow-name="xsl-region-body">
it would work.
I know this is generally possible, but I guess it is too exotic and
nobody cared to implement that possibility, yet.
Obviously no one has implemented it since then.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Tuesday, December 16, 2008 8:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I ran the transform just to generate the FO and subsequently tried to
generate the pdf from that fo and found that as long as the header text
was limited and not overflowing into the next page it was doing
fine(i.e. pdf generated) but as soon as the header overflowed from page
1 ('simple') then I ran into the same error as previous...
Error: Flow 'xsl-region-body' does not map to the region-body in
page-master 'blank-page'. FOP presently does not support this.
The FO generated from the transform is below. Plz let me know if there
is something that needs to be corrected in this.
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference
master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="simple">
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="blank-page">
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="blank">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
FOOTER TEXT
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
HEADER TEXT..Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text....
Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Tuesday, December 16, 2008 3:38 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Force page break to skip immediate next page and continue
writing on third page
Abhishek,
I don't think you're hitting a limitation of FOP. Eric has a point. It
appears that the FO you're generating is not valid and that's why FOP
shows errors. To debug the situation I suggest you take FOP out of the
picture for the moment and just run your XSLT transformation. Then take
a look at the FO file that is generated and fix your stylesheet as
necessary. As a convenience, FOP offers to run just the XSLT
transformation on the command-line:
fop -xml my.xml -xsl my.xml -foout out.fo
It can be difficult to debug problems if you always run both the XSLT
transformation and the FO layout at the same time.
Good luck!
On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:
> Yes, I am using an xsl and xml to generate my pdf through FOP 0.95
> instead of using only an FO file.
>
> However I am able to generate an FO from my xsl and xml but unable to
> generate the pdf itself either by a combination of the xsl and xml or
> just through fo alone.
>
> So this may just be a limitation of FOP. If nothing else works, I will
> probably be looking at iText to solve this issue now.
>
>
>
> ________________________________
>
> From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
> Sent: Monday, December 15, 2008 3:02 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Force page break to skip immediate next page and continue
> writing on third page
>
>
>
> It may well be true for FOP. I believe what I have in mind is legal
FO;
> maybe someone else knows for certain.
>
>
>
> Eric Amick
>
> Legislative Computer Systems
>
> Office of the Clerk
>
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
Yes. I had gone through the mailing list as well but was hoping that
this had been fixed since then. Unfortunately that does not seem to be
the case. :-(
Thanks Eric, Jeremias and Barry for all those inputs.
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Tuesday, December 16, 2008 8:37 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I found this in the mailing list archives, for what it's worth....
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Friday, June 15, 2007 1:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: flow does not map to the region-body error
Well, as the error message says, FOP doesn't support that, yet. FOP
currently expects that the flow-name of the fo:flow maps to the
region-body in the simple-page-master.
If it were:
<fo:flow flow-name="xsl-region-body">
it would work.
I know this is generally possible, but I guess it is too exotic and
nobody cared to implement that possibility, yet.
Obviously no one has implemented it since then.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Tuesday, December 16, 2008 8:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I ran the transform just to generate the FO and subsequently tried to
generate the pdf from that fo and found that as long as the header text
was limited and not overflowing into the next page it was doing
fine(i.e. pdf generated) but as soon as the header overflowed from page
1 ('simple') then I ran into the same error as previous...
Error: Flow 'xsl-region-body' does not map to the region-body in
page-master 'blank-page'. FOP presently does not support this.
The FO generated from the transform is below. Plz let me know if there
is something that needs to be corrected in this.
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference
master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="simple">
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="blank-page">
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="blank">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
FOOTER TEXT
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
HEADER TEXT..Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text....
Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Tuesday, December 16, 2008 3:38 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Force page break to skip immediate next page and continue
writing on third page
Abhishek,
I don't think you're hitting a limitation of FOP. Eric has a point. It
appears that the FO you're generating is not valid and that's why FOP
shows errors. To debug the situation I suggest you take FOP out of the
picture for the moment and just run your XSLT transformation. Then take
a look at the FO file that is generated and fix your stylesheet as
necessary. As a convenience, FOP offers to run just the XSLT
transformation on the command-line:
fop -xml my.xml -xsl my.xml -foout out.fo
It can be difficult to debug problems if you always run both the XSLT
transformation and the FO layout at the same time.
Good luck!
On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:
> Yes, I am using an xsl and xml to generate my pdf through FOP 0.95
> instead of using only an FO file.
>
> However I am able to generate an FO from my xsl and xml but unable to
> generate the pdf itself either by a combination of the xsl and xml or
> just through fo alone.
>
> So this may just be a limitation of FOP. If nothing else works, I will
> probably be looking at iText to solve this issue now.
>
>
>
> ________________________________
>
> From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
> Sent: Monday, December 15, 2008 3:02 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Force page break to skip immediate next page and continue
> writing on third page
>
>
>
> It may well be true for FOP. I believe what I have in mind is legal
FO;
> maybe someone else knows for certain.
>
>
>
> Eric Amick
>
> Legislative Computer Systems
>
> Office of the Clerk
>
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Amick, Eric" <Er...@mail.house.gov>.
I found this in the mailing list archives, for what it's worth....
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Friday, June 15, 2007 1:28 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: flow does not map to the region-body error
Well, as the error message says, FOP doesn't support that, yet. FOP
currently expects that the flow-name of the fo:flow maps to the
region-body in the simple-page-master.
If it were:
<fo:flow flow-name="xsl-region-body">
it would work.
I know this is generally possible, but I guess it is too exotic and
nobody cared to implement that possibility, yet.
Obviously no one has implemented it since then.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Tuesday, December 16, 2008 8:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I ran the transform just to generate the FO and subsequently tried to
generate the pdf from that fo and found that as long as the header text
was limited and not overflowing into the next page it was doing
fine(i.e. pdf generated) but as soon as the header overflowed from page
1 ('simple') then I ran into the same error as previous...
Error: Flow 'xsl-region-body' does not map to the region-body in
page-master 'blank-page'. FOP presently does not support this.
The FO generated from the transform is below. Plz let me know if there
is something that needs to be corrected in this.
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference
master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="simple">
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="blank-page">
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="blank">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
FOOTER TEXT
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
HEADER TEXT..Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text....
Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Tuesday, December 16, 2008 3:38 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Force page break to skip immediate next page and continue
writing on third page
Abhishek,
I don't think you're hitting a limitation of FOP. Eric has a point. It
appears that the FO you're generating is not valid and that's why FOP
shows errors. To debug the situation I suggest you take FOP out of the
picture for the moment and just run your XSLT transformation. Then take
a look at the FO file that is generated and fix your stylesheet as
necessary. As a convenience, FOP offers to run just the XSLT
transformation on the command-line:
fop -xml my.xml -xsl my.xml -foout out.fo
It can be difficult to debug problems if you always run both the XSLT
transformation and the FO layout at the same time.
Good luck!
On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:
> Yes, I am using an xsl and xml to generate my pdf through FOP 0.95
> instead of using only an FO file.
>
> However I am able to generate an FO from my xsl and xml but unable to
> generate the pdf itself either by a combination of the xsl and xml or
> just through fo alone.
>
> So this may just be a limitation of FOP. If nothing else works, I will
> probably be looking at iText to solve this issue now.
>
>
>
> ________________________________
>
> From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
> Sent: Monday, December 15, 2008 3:02 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Force page break to skip immediate next page and continue
> writing on third page
>
>
>
> It may well be true for FOP. I believe what I have in mind is legal
FO;
> maybe someone else knows for certain.
>
>
>
> Eric Amick
>
> Legislative Computer Systems
>
> Office of the Clerk
>
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
I ran the transform just to generate the FO and subsequently tried to
generate the pdf from that fo and found that as long as the header text
was limited and not overflowing into the next page it was doing
fine(i.e. pdf generated) but as soon as the header overflowed from page
1 ('simple') then I ran into the same error as previous...
Error: Flow 'xsl-region-body' does not map to the region-body in
page-master 'blank-page'. FOP presently does not support this.
The FO generated from the transform is below. Plz let me know if there
is something that needs to be corrected in this.
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference
master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="simple">
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master page-width="21.6cm"
page-height="18.5cm" master-name="blank-page">
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="blank">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
FOOTER TEXT
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Helvetica" font-weight="bold"
font-size="32pt">
HEADER TEXT..Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text....
Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....Sample Text....Sample
Text....Sample Text....Sample Text....Sample Text....Sample Text..
..Sample Text....
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Tuesday, December 16, 2008 3:38 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Force page break to skip immediate next page and continue
writing on third page
Abhishek,
I don't think you're hitting a limitation of FOP. Eric has a point. It
appears that the FO you're generating is not valid and that's why FOP
shows errors. To debug the situation I suggest you take FOP out of the
picture for the moment and just run your XSLT transformation. Then take
a look at the FO file that is generated and fix your stylesheet as
necessary. As a convenience, FOP offers to run just the XSLT
transformation on the command-line:
fop -xml my.xml -xsl my.xml -foout out.fo
It can be difficult to debug problems if you always run both the XSLT
transformation and the FO layout at the same time.
Good luck!
On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:
> Yes, I am using an xsl and xml to generate my pdf through FOP 0.95
> instead of using only an FO file.
>
> However I am able to generate an FO from my xsl and xml but unable to
> generate the pdf itself either by a combination of the xsl and xml or
> just through fo alone.
>
> So this may just be a limitation of FOP. If nothing else works, I will
> probably be looking at iText to solve this issue now.
>
>
>
> ________________________________
>
> From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
> Sent: Monday, December 15, 2008 3:02 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Force page break to skip immediate next page and continue
> writing on third page
>
>
>
> It may well be true for FOP. I believe what I have in mind is legal
FO;
> maybe someone else knows for certain.
>
>
>
> Eric Amick
>
> Legislative Computer Systems
>
> Office of the Clerk
>
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Force page break to skip immediate next page and continue writing on third page
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Abhishek,
I don't think you're hitting a limitation of FOP. Eric has a point. It
appears that the FO you're generating is not valid and that's why FOP
shows errors. To debug the situation I suggest you take FOP out of the
picture for the moment and just run your XSLT transformation. Then take
a look at the FO file that is generated and fix your stylesheet as
necessary. As a convenience, FOP offers to run just the XSLT
transformation on the command-line:
fop -xml my.xml -xsl my.xml -foout out.fo
It can be difficult to debug problems if you always run both the XSLT
transformation and the FO layout at the same time.
Good luck!
On 15.12.2008 21:10:42 Chakravarty, Abhishek wrote:
> Yes, I am using an xsl and xml to generate my pdf through FOP 0.95
> instead of using only an FO file.
>
> However I am able to generate an FO from my xsl and xml but unable to
> generate the pdf itself either by a combination of the xsl and xml or
> just through fo alone.
>
> So this may just be a limitation of FOP. If nothing else works, I will
> probably be looking at iText to solve this issue now.
>
>
>
> ________________________________
>
> From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
> Sent: Monday, December 15, 2008 3:02 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Force page break to skip immediate next page and continue
> writing on third page
>
>
>
> It may well be true for FOP. I believe what I have in mind is legal FO;
> maybe someone else knows for certain.
>
>
>
> Eric Amick
>
> Legislative Computer Systems
>
> Office of the Clerk
>
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
Yes, I am using an xsl and xml to generate my pdf through FOP 0.95
instead of using only an FO file.
However I am able to generate an FO from my xsl and xml but unable to
generate the pdf itself either by a combination of the xsl and xml or
just through fo alone.
So this may just be a limitation of FOP. If nothing else works, I will
probably be looking at iText to solve this issue now.
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 3:02 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
It may well be true for FOP. I believe what I have in mind is legal FO;
maybe someone else knows for certain.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Monday, December 15, 2008 14:47
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I am now getting the error.
Flow 'xsl-region-body' does not map to the region-body in page-master
'blank-page'. FOP presently does not support this.
So does this mean that there is no other way of doing this (currently)
through FOP. Plz refer to the modified stylesheet below which resulted
in the error above.
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference
master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name = "blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt"
font-weight="bold"
font-family="Helvetica">
<xsl:value-of
select="data/footer"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt"
font-weight="bold"
font-family="Helvetica">
<xsl:value-of
select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 11:48 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
First, you must have the page-sequence-master inside the
layout-master-set. Second, you should have only one page-sequence with
the master-reference set to "document". The page-sequence should contain
the static-content from your current "blank-page" page-sequence and the
flow from the current "simple" page-sequence. Once you've moved the
approriate pieces into this new page-sequence, delete the two you
currently have.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Monday, December 15, 2008 10:22
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I tried to use a second simple page master now however I am getting
stuck with the error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
The updated stylesheet is below. Please tell me what exactly am doing
wrong over here
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body />
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="blank-page">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/footer"/>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
</xsl:template>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Amick, Eric" <Er...@mail.house.gov>.
It may well be true for FOP. I believe what I have in mind is legal FO;
maybe someone else knows for certain.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Monday, December 15, 2008 14:47
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I am now getting the error.
Flow 'xsl-region-body' does not map to the region-body in page-master
'blank-page'. FOP presently does not support this.
So does this mean that there is no other way of doing this (currently)
through FOP. Plz refer to the modified stylesheet below which resulted
in the error above.
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference
master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name = "blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt"
font-weight="bold"
font-family="Helvetica">
<xsl:value-of
select="data/footer"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt"
font-weight="bold"
font-family="Helvetica">
<xsl:value-of
select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 11:48 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
First, you must have the page-sequence-master inside the
layout-master-set. Second, you should have only one page-sequence with
the master-reference set to "document". The page-sequence should contain
the static-content from your current "blank-page" page-sequence and the
flow from the current "simple" page-sequence. Once you've moved the
approriate pieces into this new page-sequence, delete the two you
currently have.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Monday, December 15, 2008 10:22
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I tried to use a second simple page master now however I am getting
stuck with the error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
The updated stylesheet is below. Please tell me what exactly am doing
wrong over here
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body />
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="blank-page">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/footer"/>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
</xsl:template>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
I am now getting the error.
Flow 'xsl-region-body' does not map to the region-body in page-master
'blank-page'. FOP presently does not support this.
So does this mean that there is no other way of doing this (currently)
through FOP. Plz refer to the modified stylesheet below which resulted
in the error above.
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference
master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body/>
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name = "blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt"
font-weight="bold"
font-family="Helvetica">
<xsl:value-of
select="data/footer"/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt"
font-weight="bold"
font-family="Helvetica">
<xsl:value-of
select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 11:48 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
First, you must have the page-sequence-master inside the
layout-master-set. Second, you should have only one page-sequence with
the master-reference set to "document". The page-sequence should contain
the static-content from your current "blank-page" page-sequence and the
flow from the current "simple" page-sequence. Once you've moved the
approriate pieces into this new page-sequence, delete the two you
currently have.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Monday, December 15, 2008 10:22
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I tried to use a second simple page master now however I am getting
stuck with the error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
The updated stylesheet is below. Please tell me what exactly am doing
wrong over here
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body />
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="blank-page">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/footer"/>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
</xsl:template>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Amick, Eric" <Er...@mail.house.gov>.
First, you must have the page-sequence-master inside the
layout-master-set. Second, you should have only one page-sequence with
the master-reference set to "document". The page-sequence should contain
the static-content from your current "blank-page" page-sequence and the
flow from the current "simple" page-sequence. Once you've moved the
approriate pieces into this new page-sequence, delete the two you
currently have.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Monday, December 15, 2008 10:22
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I tried to use a second simple page master now however I am getting
stuck with the error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
The updated stylesheet is below. Please tell me what exactly am doing
wrong over here
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body />
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="blank-page">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/footer"/>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
</xsl:template>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
I tried to use a second simple page master now however I am getting
stuck with the error as
fo:Validation Exception: Error(Unknown location): fo:page-sequence is
missing child elements.
Required Content Model: (title?,static-content*,flow)
The updated stylesheet is below. Please tell me what exactly am doing
wrong over here
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body />
<fo:region-after/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank-page"
page-height="18.5cm"
page-width="21.6cm"
>
<fo:region-body region-name="blank"/>
<fo:region-after/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="blank-page">
<fo:static-content flow-name="blank">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/footer"/>
</fo:block>
</fo:static-content>
</fo:page-sequence>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="32pt" font-weight="bold"
font-family="Helvetica">
<xsl:value-of select="data/header"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference
master-reference="blank-page"/>
<fo:repeatable-page-master-reference
master-reference="simple"/>
</fo:page-sequence-master>
</xsl:template>
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Monday, December 15, 2008 8:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Amick, Eric" <Er...@mail.house.gov>.
That isn't necessarily a problem. Is there only one data/footer element?
If so, you can just put the needed xsl:value-of in the
fo:static-content.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 16:35
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
Yes, unfortunately the footer content is dynamic and will change
depending on the content being pulled in by the xml. :-(
________________________________
From: Amick, Eric [mailto:Eric.Amick@mail.house.gov]
Sent: Friday, December 12, 2008 4:26 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Force page break to skip immediate next page and continue
writing on third page
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek
RE: Force page break to skip immediate next page and continue writing on third page
Posted by "Amick, Eric" <Er...@mail.house.gov>.
I assume that simple is a simple-page-master. Create a second
simple-page-master called, say, blank-page which is a copy of simple
with one difference: Define the region-body in blank-page as
<fo:region-body region-name="blank"/>
You'll then need an fo:page-sequence-master that looks something like
this:
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="simple"/>
<fo:single-page-master-reference master-reference="blank-page"/>
<fo:repeatable-page-master-reference master-reference="simple"/>
</fo:page-sequence-master>
Take the page break off the fo:block as well. If you use that
page-sequence-master, you will get a blank second page if and only if
the data overflows the first page. Putting the footer on the second page
is trickier and depends on whether that footer can change. If this was
FO 1.1, you could use flow maps; you may have to resort to having
fo:static-content in blank-page instead.
Eric Amick
Legislative Computer Systems
Office of the Clerk
________________________________
From: Chakravarty, Abhishek [mailto:AbhisheC@accidentfund.com]
Sent: Friday, December 12, 2008 14:53
To: fop-users@xmlgraphics.apache.org
Subject: Force page break to skip immediate next page and continue
writing on third page
Hi
I need to force page break within my fo block such that
If there is content from page 1('header') which is overflowing onto page
2 then it skips page 2 but continuous onto page 3 while at the same time
the 'footer' is written on page 2.
This is what my XSL looks like
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block break-after="page">
<xsl:apply-templates
select="data/header"/>
</fo:block>
<fo:block>
<xsl:apply-templates
select="data/footer"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="header">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
<xsl:template match="footer">
<fo:block
font-size="32pt"
font-weight="bold"
font-family="Helvetica"
>
<xsl:value-of select="."/>
</fo:block>
</xsl:template>
Regards
Abhishek
Regards
Abhishek