Re: Page numbering
AFAIK it is not possible to calculate the number of pages without generating
Depending on your FO implementation you may not need to generate the PDF but you will have to process the FOs involved.
With Antenna House XSL Formatter, using it's Java or .NET API, you can process FO input and get back the number of pages produced, without also generating any actual output. This makes it possible to do what you might call "one and a half pass" processes when you need to know the page count for things. You can integrate this with your XSLT by writing an XSLT extension function (e.g., write a Saxon extension that uses the XSL Formatter Java API).
I believe RenderX XEP has similar capabilities but I've not tried to do it with XEP.
As mentioned, worst case is you generate PDF and use a tool like iText or PDFBox or another PDF library to get the page count and then do a second pass.
Eliot -- W. Eliot Kimber Professional Services Innodata Isogen 8500 N. Mopac, Suite 402 Austin, TX 78759 (214) 954-5198
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