I'm looking for an easy way to place a character (e.g. the hash '#') at
the beginning of each line. The scenario is, that under 'normal'
conditions a text is written without the hash at the beginning and under
several conditions the text must contain the hash at the beginning of
each line.

The text under 'normal' conditions would for example look like this:

     This is the first line of the paragraph
         and thats the text which broke and 
         here the third line.

To achieve this I would do something like:

String s = “This is the first line of the paragraph and thats the text
which broke and here the third line.”;

Paragraph para = new Paragraph(s, font);
para.setFirstLineIndent(-46);
para.setIndentationLeft(55);
para.setIndentationRight(90);
document.add(para);

When writing under 'special condition', the same text should look as
follows:

#     This is the first line of the paragraph
#         and thats the text which broke and 
#         here the third line.

So the question is, if there is an easy way to achieve this behavior?

Best regards,
Georg


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to