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(_at_)innodata-isogen(_dot_)com
www.innodata-isogen.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--