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

Re: Page numbering

Subject: Re: Page numbering
From: "Eliot Kimber" <ekimber@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 25 May 2007 10:21:37 -0400
Re:  Page numbering
Eike Jordan wrote:

AFAIK it is not possible to calculate the number of pages without generating
the complete PDF. But perhaps iText [1][2] might be useful for your purposes.

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.

Cheers,

Eliot
--
W. Eliot Kimber
Professional Services
Innodata Isogen
8500 N. Mopac, Suite 402
Austin, TX 78759
(214) 954-5198

ekimber@xxxxxxxxxxxxxxxxxxx
www.innodata-isogen.com

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-2011 All Rights Reserved.