On 26/07/2011 10:53, CRON_20 wrote:
> Hi
>
> I use PDFStamper for adding some text to left side of each page of my pdf.
> But my text is very long and go out from page.
>
> PdfContentByte overlay = stamper.getOverContent(i);
> ...
> overlay.setTextMatrix(0, 1, -1, 0, 20, 20);
> overlay.newlineShowText("here my text with very long length");
> ...
>
> How itext can wrap text to next line?
>
> sorry if it's duplicate, but I not found thread like this

You should use ColumnText. Not the ColumnText.showTextAligned() method, 
but an instance of ColumnText for which you define a rectangle (llx, 
lly, urx, ury), not just an offset (x,y). That's elementary: if you only 
define an offset (x,y) how can iText know when to wrap the text?

PS: didn't we tell you yesterday that you could save yourself (and us) 
plenty of time by reading the documentation first? You can find the 
information you need in chapter 3 of http://itextpdf.com/book/

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
iText-questions mailing list
[email protected]
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