Eric Summkeller wrote: > 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?
When you create a Paragraph this way: Paragraph p1 = new Paragraph(); you don't define a leading, so the default leading (16pt) is used; this is the default if you don't define any font; otherwise the default font is 1.5 times the font size. Then you add Phrases to these paragraph using font sizes that exceed this default leading (20 > 16). Adding a Phrase with a specific font to a Paragraph doesn't change the leading of this paragraph. It's only normal that the last Paragraph overwrites the one before. It's elementary; nothing is wrong here; iText is doing exactly what you ask iText to do. br, Bruno ------------------------------------------------------------------------- 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/