"setSpacingBefore" won't work if it's the first element in the page. Use a paragraph with leading 0 and setSpacingAfter to make the space.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Robert Esterer > Sent: Tuesday, February 22, 2005 11:02 AM > To: [email protected] > Subject: [iText-questions] Paragraph position > > Hello, > > I'm currently trying to write a simple program that fills an > almost empty > PDF with data from a text file. > My problem is that I can't get iText to place the paragraph > where I want. > Here is part of my code: > > String text = "", line = ""; > > while ((line = filler.readLine()) != null) > { > text += line + "\n"; > } > Paragraph p = new Paragraph(text, > FontFactory.getFont(FontFactory.COURIER, 10, Font.NORMAL)); > > p.setSpacingBefore(100); > document.add(p); > > It adds the text but "setSpacingBefore" is being ignored. > Interesting enough > "setLeading" works. > > Is there any other way to set the x/y position where the new paragraph > should start? > > > Best regards, > > -Robert > ____________ > Virus checked by G DATA AntiVirusKit > Version: AVK 15.0.3140 from 17.02.2005 > Virus news: www.antiviruslab.com > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from > real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
