I create three different Phrases with three different font sizes. After that I 
add each Phrase into a Paragraph and add the three Paragraphs into the 
Document.
The error is that the content of the last written Paragraph overwrites the 
content in the line before.
Any ideas what I do wrong?

My code:

document.open();

Phrase phrase1 = new Phrase("Test",FontFactory.getFont
(FontFactory.COURIER,10,Font.NORMAL,new Color(255, 0, 0)));
Phrase phrase2 = new Phrase("Test",FontFactory.getFont
(FontFactory.COURIER,20,Font.NORMAL,new Color(255, 0, 0)));
Phrase phrase3 = new Phrase("Test",FontFactory.getFont
(FontFactory.COURIER,40,Font.NORMAL,new Color(255, 0, 0)));

Paragraph p1 = new Paragraph();
Paragraph p2 = new Paragraph();
Paragraph p3 = new Paragraph();

p1.add(phrase1);
p2.add(phrase2);
p3.add(phrase3);

document.add(p1);
document.add(p2);
document.add(p3);

document.close();


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to