xsl-list
[Top] [All Lists]

Re: [xsl] Page numbering

2007-05-25 07:10:30
Andy Carr1 wrote:
Hi, I need some help

I use xsl-fo to transform document xml (stored in a repository) into PDF.

However prior to printing the document I need to create a cover sheet(s) which could run to several pages. My intention is to use xsl-fo to create this cover sheet, which must contain the number of pages (document + cover-sheet(s) ).

Does anyone know how I could calculate the number of pages in the repository stored document "on the fly" as the cover sheet needs to contain this information.

The process flow is something like

1. Search Repository
2. Find Document
3. Right click -> print request
4. Create cover-sheet PDF (containing number of pages)
5. Send cover-sheet and document to printer as PDF.


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.
With iText your process pipeline may look like this
1. Search Repository
2. Find Document
3. Right click -> print request
4a. Create PDF
4b. Create cover-sheet PDF width iText (containing number of pages)
5. Send cover-sheet and document to printer as PDF.

Regard, EJ

[1] http://www.lowagie.com/iText/
[2] http://www.manning.com/lowagie/

--
Eike Jordan  <jordan(_at_)fiz-chemie(_dot_)de>

| FIZ CHEMIE BERLIN
| Franklin Str. 11               ------    ,__o
| 10587 Berlin                  ------   _-\_<,
|                              ------   (+)/'(+)
| Tel. : 0049-30-39977 214


--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>