When I generate PDFs with iText using the document.add(Element) method, it frequently happens that the title of a paragraph is renedered at the end of the current page, and the paragraph itself at the new page.

Still worse, when I add the following to the document:

"Paragraph 1 title"
"Paragraph 1 text"
"Paragraph 1 image"
""
"Paragraph 2 title"
"Paragraph 2 text"

sometimes the result I get is:

Paragraph 1 title
Paragraph 1 text

Paragraph 2 title
--- page break ---
Paragraph 1 image
Paragraph 2 text

I wonder if there is some way to control the remaining bottom "empty" space in the document, in order to do a newPage() when the remaining space is not enough.

Alternatively, a way to force two paragraphs to be rendered on the same page would be a solution, too. Also guaranteeing that Elements are rendered in the same order they were added to the document.

I have looked at the documentation, the source code, and the archives but could not find a solution. Perhaps I am missing something?

Thanks in advance,
Carlos Amengual



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to