[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Strategies for complex page numbering in PDF's.

Subject: Strategies for complex page numbering in PDF's.
From: Dan Haley <dhaley77@xxxxxxxxx>
Date: Tue, 01 Feb 2011 08:38:49 -0700
 Strategies for complex page numbering in PDF's.
All,

I have a question about custom page numbering ("point pages") when creating a PDF. I'm using XSLT to create XSL-FO from an XML instance. My XSLT processor is Saxon 9 and my XSL-FO processor is RenderX (4.18).

What I need to do is be able to change the page numbering once it reaches a certain point. (The page number that is in the footer (static-content).)

Lets say I have a book that has multiple chapters in it. Each one of these chapters has a chapter number. This chapter number is what the page numbering is based on.

For example, if the chapter number is 2000, the first page of the chapter would be 2001.

This is fine up until the 998'th page (the chapter has to end on an even page). For example, if chapter 2000 had 1,002 pages the page numbering of the last 6 pages would be:

2997, 2998, 2999, 3000, 3001, 3002

This is incorrect since there might be a chapter 3000.

What I need to do is be able to change the page numbering after the 998'th page. Using my chapter 2000 with 1,002 pages example, the numbering should be:

2997, 2998, 2998.1, 2998.2, 2998.3, 2998.4.

This is what I'm doing now:

* I'm using <fo:page-number> in my fo:static-content.
* I'm setting the starting page number (chapter number + 1) using the initial-page-number attribute in the fo:page-sequence element.


If I have to I can manipulate the intermediate file that XEP (RenderX) creates, but I think it could get messy and I'm not sure how reliable that would be. Also, updating the Table of Contents would probably end up being a nightmare. (The intermediate file produced by XEP is the post-processed XSL-FO; it has the page numbers already generated.)

Does anyone have any suggestions on strategies I can use to accomplish this? I thought I read somewhere that I could use a maximum-repeats attribute in the page-sequence-master element (like maximum-repeats="998") and then use a different master page, but I have no idea how to do that.

Thanks,

Dan

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.