Bruno Lowagie <[EMAIL PROTECTED]> said:

> [EMAIL PROTECTED] wrote:
> 
> >Hello all,
> >
> >  
> >
> FYI: the address is [email protected]
> You mailed your question to the admin instead.
> 
> >i am new at iText and i need to create a pdf simply by placing several
> >elements (words, numbers or sentences) at specific positions in a page. The
> >position to place an element is defined by its x and y points, its height and
> >its width.
> >The problem is that i want to wrap the text in the rectangle that contains 
> >it.
> >This means that if the text does not fit in one line of the rectangle and if
> >the height of the rectangle has not been reached, to write the rest of the
> >text at a new line inside the rectangle.
> >  
> >
> This sounds like a job for (Multi)ColumnText:
> http://itextdocs.lowagie.com/tutorial/objects/columns/
> br,
> Bruno
> 


One more question.
I need to write a text inside a rectangle. The rectangle needs to be painted.
So, i use the pdfContentByte.rectangle to create a painted rectangle. The
arguments are: the lower_left_x_point, lower_left_y_point, width, height.
For displaying the text i use the the ColumnText.setSimpleColumn method with
argument: the Phrase, lower_left_x_point, lower_left_y_point,
uper_right_x_point, uper_right_y_point and 10 for the leading.

The size of the text i need to insert vary from element to element. I create a
Font object and use it as argument to create the Phrase object.
The problem is that the text ges out of the rectangle if the size is large.

Does anyone know how to surpass this problem?





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to