There's always an uncertainty with document.add() because of the way the leading is treated internally and the widow/orphan control. If you want to control precisely what you're doing use ColumnText. In this simple case you can even use PdfContentByte.showText() and do it a lot faster.
Best Regards, Paulo Soares ----- Original Message ----- From: "Christian Kriebel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 15, 2004 14:33 Subject: [iText-questions] leading, lines per pages, page height - last line is on new page ? > Hi > > Having the following requirements on a page > > Format: A4 landscape > hMargin: (left/right) = 36 points > vMargin: (top/bottom) = 10 points > > Lines per inch: 9.5 > Chars per inch: 13.0 > Lines per Page 75 > > Each line is added as a Paragraph (single line, no wrap) > Paragraph lP = new Paragraph( line, font ); > lP.setLeading( leading ); > > 1.) font size is calculated as > FontSize = 120.0 / Chars per inch = 9.230769 > (I use the fixed width font Lucida Sans typewriter) > > 2.) leading is calculated as > - leading = 1.0 / Chars per inch * 72.0 = 7.5789475 > > > A4 landscape page has a height of 595 points > adding 75 lines with leading 7.5789475 = 568.4 points > plus 2 times vMargin of 10 points = 588.4 > > But line 75 appears on a new page ? > > Any suggestion ? > > Thanks in advance > > -- > NEU: WLAN-Router f�r 0,- EUR* - auch f�r DSL-Wechsler! > GMX DSL = superg�nstig & kabellos http://www.gmx.net/de/go/dsl > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
