I create one Paragraph with a big font size and one Paragraph with a smaller
font size. My problem is that the Paragraph with the big font size overlaps
the Paragraph with the small font size. How I have to set the leading, that
the second Paragraph is directly written under the first Paragraph?
Code:
Font font = new Font(Font.TIMES_ROMAN, 72, Font.BOLD | Font.ITALIC |
Font.UNDERLINE);
Chunk chunk1 = new Chunk("_Text1!", font);
Phrase phrase1 = new Phrase();
phrase1.add(chunk1);
Paragraph par = new Paragraph();
par.add(phrase1);
document.add(par);
Font font2 = new Font(Font.TIMES_ROMAN, 20, Font.BOLD | Font.ITALIC |
Font.UNDERLINE);
Chunk chunk2 = new Chunk("_Text2!", font2);
Phrase phrase2 = new Phrase();
phrase2.add(chunk2);
Paragraph par2 = new Paragraph();
par2.add(phrase2);
document.add(par2);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/