Sorry this was a code piece from my codebase and I did not realize that I
left off TeacherUser.PHRASE. Please replace it with a Phrase object that
contains text you would like to write. Please note that this will only allow
you to write text in a single row. Look at examples from the book about
ColumnText to learn how to write in multiple lines.
On Tue, Feb 8, 2011 at 3:59 AM, Yuri Sarzi <[email protected]> wrote:
> Hi Nurettin, really many thanks for your help! I got some troubles with
> TeacherUse.PHRASE. What does it is? I'm not able to find "TeacherUse" in
> APIs.
> And again, what about wrappers? Can you suggest me the class to use?
> (CellWrapper or TableWrapper?)
>
> Thank you
> Yuri
>
> 2011/2/4 Nurettin DAG <[email protected]>
>
>> You cannot really write inside the rectangle since it is just a graphical
>> object. However, what you can do is to use the rectangle in hand to
>> determine the x-y coordinates of where to start writing text using
>>
>> ColumnText.showTextAligned(pdfPContentByte, Element.ALIGN_CENTER,
>> TeacherUse.PHRASE,
>> xPos, yPos, 0);
>>
>> If you want it centered obviously your coordinates would be like
>>
>> xPos = (rectangle.getLeft() + rect.getRIGHT() ); add any offset if you
>> would like etc.
>>
>> I would put all this in a wrapper method so it will be like writing in the
>> rectangle if that is what you want.
>>
>> Good luck
>> Nurettin
>>
>> On Fri, Feb 4, 2011 at 9:33 AM, Yuri Sarzi <[email protected]> wrote:
>>
>>> Hi,
>>> i'm trying to make a sort of labelling system, using your Rectangle
>>> class. It is quite simple to do, but now i'm in trouble with filling the
>>> rectangles with text.. I would like to write both horizontally and
>>> vertically in my rectangles! How do i can do?
>>>
>>> Please find attached my java class (it makes a pdf file with rectangles)
>>>
>>> Best Regards
>>> Yuri Sarzi
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The modern datacenter depends on network connectivity to access resources
>>> and provide services. The best practices for maximizing a physical
>>> server's
>>> connectivity to a physical network are well understood - see how these
>>> rules translate into the virtual world?
>>> http://p.sf.net/sfu/oracle-sfdevnlfb
>>> _______________________________________________
>>> iText-questions mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>
>>> 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
>>>
>>
>>
>>
>> --
>> Nurettin DAG
>>
>>
>> ------------------------------------------------------------------------------
>> The modern datacenter depends on network connectivity to access resources
>> and provide services. The best practices for maximizing a physical
>> server's
>> connectivity to a physical network are well understood - see how these
>> rules translate into the virtual world?
>> http://p.sf.net/sfu/oracle-sfdevnlfb
>> _______________________________________________
>> iText-questions mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> 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
>>
>
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> 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
>
--
Nurettin DAG
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
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