Eric, That thought had crossed my mind, but we take a random amount of formatted text from a CMS and pass it into FOP using a template, the output however was doing the cover page as page 1 rather than the inside of the cover, the answer I got was what I was looking for,
I had been looking at the page-number tag not the page-sequence tag and initial-page-number tag, This in my opinion is FO as it is the input to FOP without needing any XSLT. Thank you all who have assisted and while I think the discussion was interesting, we should leave it for now, or risk upsetting the majority of users on this list. Kindest regards Theresa Forster Senior Software Developer From: Eric Douglas [mailto:[email protected]] Sent: 31 August 2011 16:17 To: [email protected] Subject: RE: pagenumbering I agree that discussion was petty. If someone thought the question was off topic they are welcome to respond with links to point you somewhere you might get better answers or ignore the question. While I haven't checked what other XSLFO processors exist, it seems the XSLT and XSLFO specifications are both generic and unrelated to FOP. If the question is about creating XSL in either form it may be technically off topic, though I for one don't care. If the question is about how FOP specifically interprets your XSLFO, or about whether a feature is supported then it's most relevant. I use FOP in a most unconventional way but I've stuck with it for 2 reasons I can think of. 1) I don't know of any other free project which creates PDFs with all the options FOP has. 2) FOP was initially recommended to us by a consultant and I've gotten it to work so if it isn't broken there's no need to change. If there is another PDF create project with all the features we need that can create more efficiently we'll likely switch eventually. FOP doesn't handle large transforms. I tested creating a 1000 page PDF and it ran out of memory, though the output is small and the input is reasonably small. I got around this bug by creating 1 page PDFs. We generate our input programmatically so we know what goes on each page, so I just broke it up. I increment the page number on each PDF and just pass it in as a tag. <fo:page-sequence> <xsl:attribute name="master-reference">STANDARD_PAGE</xsl:attribute> <xsl:attribute name="initial-page-number"><xsl:value-of select="IPN"/></xsl:attribute> Then I use pdfbox to mrge the resulting PDFs. _____ From: Theresa Jayne Forster [mailto:[email protected]] Sent: Wednesday, August 31, 2011 9:41 AM To: [email protected] Subject: RE: pagenumbering Thanks for the response but the question was already answered, but then a petty discussion started about whether fo:page-number was FOP or XSLT Kindest regards Theresa Forster Senior Software Developer From: Chen Yang [mailto:[email protected]] Sent: 31 August 2011 14:20 To: [email protected] Subject: RE: pagenumbering Hey Theresa, Not sure if this answer your question, I need to start the page 1 after cover page and Table of contents <xsl:call-template name="insert_cover_page_template"/> <xsl:call-template name="insert_bookmarks"/> <xsl:call-template name="insert_table_of_contents_page_template"/> Then I bought in my contents template <xsl:call-template name="insert_contents_page_template"/> Inside the insert_contents_page_template <xsl:template name="insert_contents_page_template"> <fo:page-sequence master-reference="A4-landscape" initial-page-number="1" > <xsl:call-template name="insert_page_header-template"/> <xsl:call-template name="side_bar"/> <xsl:call-template name="insert_page_footer_template"/> <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates/> <fo:block id="TheVeryLastPage"/> </fo:flow> </fo:page-sequence> </xsl:template> Page number template <!-- page number --> <xsl:template name="page_number"> <fo:block-container absolute-position="absolute" top="5mm"> <fo:block font-family="sans-serif" font-size="7pt" text-align="right" color="black" > Page <fo:page-number/> of <fo:page-number-citation ref-id="TheVeryLastPage"/> </fo:block> </fo:block-container> </xsl:template> Finally,Insert page number into footer template <!-- footer --> <xsl:template name="insert_page_footer_template"> <fo:static-content flow-name="xsl-region-after"> .. . .. <xsl:call-template name="page_number"/> </fo:static-content> </xsl:template> Now the "Page 1 of X" will start on the first content page, not on my cover page or table of contents page. Regards Chen Yang Programmer / Analyst HRSG (Human Resource Systems Group) 6 Antares Drive,Phase II Suite 100 Ottawa, ON, K2E 8A9 <tel:613-745-6605> Tel: 613-745-6605 x 254 Fax: 613-745-4019 Email: <mailto:[email protected]> [email protected] Web: <http://www.hrsg.ca/> www.hrsg.ca "Competency-based HR Solutions" From: Theresa Jayne Forster [mailto:[email protected]] Sent: August-30-11 9:50 AM To: [email protected] Subject: pagenumbering I was wondering, how can you change the page numbering on page-number-citation stuff, We have the requirement of numbering starting on the inside cover as page 1 not page 2 as currently the front page is classed as page 1. Is there any way to make the numbering start from 1 on the inside of the front cover? Kindest regards Theresa Forster Senior Software Developer _____ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11 _____ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1392 / Virus Database: 1520/3866 - Release Date: 08/29/11
