You need a ColumnText with Paragraph.setKeepTogether(). ----- Original Message ----- From: "Tomasz Tołwiński" <[EMAIL PROTECTED]> To: <itext-questions@lists.sourceforge.net> Sent: Thursday, January 06, 2005 2:46 PM Subject: [iText-questions] how to get coordinates of paragraphs in the document object?
> Dear Paulo, > > I would like to have some influence on the formatting of the resulting PDF > document as far as paragraphs are concerned. Specifically, I would like to > make sure that if a paragraph takes too much space to fit entirely in one > page, it will not be divided between pages. I want it to be moved as a whole > to the next page. > > I noticed that there such a mechanism exists, but only for tables ( > table.setTableFitsPage(true); ). > > Is there any way to do it for paragraphs? > > I suppose there is no simple solution for that, as I could not find any > methods for that purpose in iText. > > If only I knew a position in the document of the last object (paragraph, > table, etc) added to the document (Y position in the resulting PDF page) and > Y size of the paragraph I would like to add (in points), I could check if > it fits the page or not. I suppose I would have to read internal variables > of the document object in order to get the Y position, right? > > I would really appreciate if you could help me solve my problem. > > Thanks in advance. > > Regards, > > Tomasz Tolwinski > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions