- From: Paulo Carvalho <pjcarvalho@gmail.com>
- Date: Mon, 13 Dec 2010 15:06:39 +0100
- To: www-xsl-fo@w3.org
- Message-ID: <AANLkTiksZo94esnmsueWpvMU3M9h15UURFZUBaT0VVgj@mail.gmail.com>
Hello
I am having a problem using FOP (I am using FOP 0.95 - I also tried with FOP
1.0 with the same result): I want to generate a PDF document and add a blank
page in the end of that document in the case it has an odd number of pages:
- if the document has a even number of pages, no blank page is
added (for example if the generated PDF document has 4 pages, nothing more
is made)
- if the document has an odd number of pages, a blank page is added
in the end of the document (for example, if the document is generated with 3
pages, a blank page i added to the document so it will have 4 pages)
Do insert a blank page, when my generated document has an odd page number,
in the end of my FO file I added the following code:
<fo:block break-after="odd-page" margin="0pt" space-before="6pt"
space-after="6pt">
<fo:inline>
<xsl:text>abcdef</xsl:text>
</fo:inline>
</fo:block>
The result was not the expected (a document with 2 pages - Normally, my
generated document has 2 pages). With the "break-after='odd-page'"
attribute, my generated document has 3 pages (the 3rd one is a blank page).
So, I changed the break-after argument to "break-after='even-page'" and the
result was even more unexpected: the result was a document with 4 pages -
the 3rd and 4th pages were blank pages.
Is it a bug from FOP or am I using the break-after property in a wrong way?
Thanks
regards
Received on Monday, 13 December 2010 14:07:12 UTC