Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

Re: [iText-questions] Page numbers disturbed by creating coverpage

Sushil Vegad

2007-07-12

Replies:

Hello,
The document.setPageCount() did it.

Thanks again,
Sushil


-----Original Message-----
From: itext-questions-bounces@(protected)
[mailto:itext-questions-bounces@(protected)
Vegad
Sent: Thursday, July 12, 2007 9:06 AM
To: 'Post all your questions about iText here'
Subject: [iText-questions] Page numbers disturbed by creating coverpage

Hi,
When I insert a cover page, my page numbers are getting disturbed. If I
don't create a cover-page, the numbering is fine

I first create a cover page and then get the PDF data by parsing an xml.
document.open();
writer.setPageEmpty(false);
createCoverPage();

//get the data from an xml file:
document.newPage();
SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
parser.parse(................);

If the PDF were to have 2 pages (1st=cover-page, 2nd=data), my page numbers
are "Page 1 of 3" on cover-page and "Page 3 of 3" on data page.
It should be "1 of 2" and "2 of 2". I think this is happening because of the
newPage() call. If I omit the call then my data gets displayed on the first
page instead of cover-page.

Please let me know how I can solve this.

Thanks,
Sushil Vegad



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
©2008 junlu.com - Jax Systems, LLC, U.S.A.