Friedhelm wrote:
> I want to ensure that a specific chunk starts on a new page. I have done
> this with Chunk.NewPage.
> Sometime, depending on the content, the chunk is already the first
> element on the page so inserting a Chunk.NewPage creates empty pages.
> I have set the option to ommit empty pages, but they are still there. I
> remember one article posting something like "for itext the page might
> not be empty...".
>
> Has anyone a workaround for this?
In PdfDocument.java, you'll find this snippet:
pageEmpty = false;
if (chunk.isAttribute(Chunk.NEWPAGE)) {
newPage();
}
if you would place pageEmpty = false; after the if,
you wouldn't have the empty pages. It's not clear
if this is a bug or desired behavior.
--
This answer is provided by 1T3XT BVBA
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/