Hello!
I'm using iText to construct a pdf-document. My document consists of
serveral paragraphs, which should have differend indentations. I looked up
the respective methods in the documentation, but i can't make indentation
work. Also, i didn't find any hints on the mailinglist or elsewhere.
 
So that's what i'm doing:
 
<code>
// Document with margins
Document doc = new Document(PageSize.A4, 20.0f, 20.0f, 20.0f, 20.0f);
 
[.]
Font bold = new Font(Font.HELVETICA, FONTSIZE_NORMAL, Font.BOLD);
p = new Paragraph();
p.setFont(normal);
p.add(new Chunk("headline", bold));
p.add(Chunk.NEWLINE);
                                               
Paragraph p2 = new Paragraph();
p2.setFont(normal);                                     
p2.setIndentationLeft(40.0f);
p2.add(new Chunk("some text")));
p2.add(Chunk.NEWLINE);
p.add(p2); 
[.]
doc.add(p)
</code>
 
I would expect that the two paragraphs would have different indentations,
but nothing happens. What am I missing here? I'll appreciate any help!
 
Thanks in advance!
Reinhard
 
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to