If you don't use lists a solution is possible. The keep together is done by
wrapping the paragraph inside a table and Table is not the most reliable
class. It would be helpful to post a small runnable example with the
problem.
Best Regards,
Paulo Soares
----- Original Message -----
From: "Don Swag" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 28, 2003 20:47
Subject: [iText-questions] Paragraph.setKeepTogether(true) - Unreliable
> Hi,
>
> My first posting this, and excuse me if this is a
> common question, but I am finding that I cannot rely
> on calling Paragraph.setKeepTogether(true) method to
> keep my paragraphs from breaking across pages.
>
> My paragraphs are short - 3 lines each. Here's how
> they are created:
>
> ...
> while (i.hasNext()){
> ...
> Paragraph paragraph = new Paragraph();
> paragraph.setKeepTogether(true);
> Phrase heading = new Phrase(centerName,
> headingFont);
> Phrase details = new Phrase(centerInfo, bodyFont);
> paragraph.add(heading);
> paragraph.add(details);
> doc.add(paragraph);
> }
> ...
>
> Are there any known solutions to this? (iText does
> EVERYTHING else I need to create a very nicely
> formatted PDFs.)
>
> Thanks
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01
> /01
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions