Quoting Rachel Jourdan <[EMAIL PROTECTED]>:

> 
> Hello, 
> 
> I am trying to add a page break to the document using: document.newPage(). 
> It is not working correctly, a new page is only being added to the beginning
> of the pdf.  Any suggestions?

Or you are constructing a large Table (1),
or you are using Chapters and Sections (2).

(1) the table will only be added at the moment
    you do document.add(table). If you do document.newPage()
    before adding the table, the newPage is added before the
    table. (It's quite logical if you think about it).
    You have to split your tables as described in the tutorial.
(2) If you do document.newPage() before document.add(chapter),
    the same logic applies, but you can work around this by
    adding special Chunks:
    Chunk chunk = new Chunk("");
    chunk.setNewPage();
    section.add(chunk);

HTH,
Bruno


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to