[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Consecutive page numbering using XSL:FO-to-PDF
I have written an XSLT stylesheet that uses more than one <fo:page-sequence> to create front matter, a TOC, and chapters in the target PDF document. To try and obtain consecutive page numbers that run from the first page of the first chapter to the last page of the last chapter, I've used the initial-page-number property, set to "auto", in each <fo:page-sequence> element. The result is a PDF document, nicely formatted into chapters with left and right pages, that has each chapter's first page starting at 1. For example: I call the "static_content" template from within the <fo:page-sequence> element ... <fo:page-sequence master-name="chapter" initial-page-number="auto"> <xsl:call-template name="static_content" /> <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates select="./section" /> </fo:flow> </fo:page-sequence> and then, within the "static_content" template, I use <fo:page-number /> to generate the page number ... <fo:static-content flow-name="odd_footer"> <fo:table> <fo:table-column column-width="3.5in" /> <fo:table-column column-width="2.5in" /> <fo:table-column column-width="1.0in" /> <fo:table-body font-family="sans-serif" font-size="9pt" font-weight="200"> <fo:table-row> <fo:table-cell> <fo:block text-align="start"> <xsl:value-of select="./sectionTitle" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="end"> <fo:page-number /> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:static-content> Does anyone know what I'm doing wrong or how I can obtain sequential page numbers when using more than one <fo:page-sequence>? I'm using FOP version 0.19 for the FO-to-PDF conversion. Thanks, Drew Hodge Technical Writer (613) 270 3652 drew.hodge@xxxxxxxxxxx www.entrust.com Entrust(R) Securing the Internet XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|