Karthika Rachna R wrote:
> I have a requirement to wrap text with in a rectangle. I’m using the 
> simple column text for doing the same.
> 
>   ColumnText columnText = new ColumnText(pdfTemplate);
>   columnText.setSimpleColumn(x, y, x+boxWidth, y+boxHeight,  
> columnText.getLeading(), Element.ALIGN_LEFT);
>   columnText.setText(new Phrase(text, f));
>   columnText.go();
> The below shown diagram is the result of the above code.
>
> Actually my requirement is that I need to get rid of the gap between 2 
> lines.

The "gap between 2 lines" has a name: the leading.
You define the leading as columnText.getLeading(),
which is kind of strange.

You should make sure that the leading corresponds
more or less with the font size. For instance 1.2
or 1.5 times the font size.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to