By Date: <-- -->
By Thread: <-- -->

Page numbering when total pages > 1



rpaquett (at) cmhc-schl.gc.ca wrote:

Hi Bruno,

Yes, I understand, but in this case if a document has 3 pages, the page number will only be displayed on page #2 and #3.... but in this case I need all 3 pages to be labelled? Does that make sense?

Aha, I missed that part.
Maybe you could add a PdfTemplate instead of a page number for page 1.
When onCloseDocument is called, you look if the document has more than 1 page or not.
Another way is to create the PDF in two passes.
First create it, then use PdfReader to get the number of pages.
If > 1, use PdfStamper to add a page number to each page.
br,
Bruno



------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ iText-questions mailing list iText-questions (at) lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions