Hi all
 
I am using the ColumnText class to put text on an absolute position in a PFD-document.
 
One of the methods within ColumnText is setAlignment.
Some tests learned me that the beginning of the text is aligned
If I want put the text 'The quick brown fox jumped over his lazy dog' in a ColumnText object and
I set the alignment to Center, the first letter of the string is centered, i.e the text starts in the middle of the ColumnText.
In the same way, if I set the alignment to Right, the text starts at the right edge of the ColumnText.
 
Is it possible, without calculation, to center my text in such a way that the middle of the string is in the middle of the ColumnText,
or that the last character of the string ends at the right edge of ColumnText?
 
I know I can use the showTextAligned method from the PdfContentByte class, but what I really want is:
- define a ColumnText with a certain dimension
- align my text within this ColumnText:
  - centered: the middle of my text is in the middle of the ColumnText
  - right:    the last letter of my text ends on the right edge of the ColumnText
  - left:     the first letter of my text starts on the left edge of trhe ColumnText
 
Or is there an other easy way to center text as described above within a certain part of a PDF-document?

Thank you all
 
Martin
[EMAIL PROTECTED]
--

Dit e-mailbericht en eventuele bijlage is uitsluitend bestemd voor de geadresseerde(n) en strikt vertrouwelijk of anderszins wettelijk beschermd. In dit bericht vervatte opvattingen of meningen zijn uitsluitend die van de schrijver en niet per definitie die van P.C. Hooft Groep BV of aan haar gelieerde dochterondernemingen. Er kunnen aan dit bericht geen rechten worden ontleend.

Indien u niet de geadresseerde bent, verzoeken wij u dit bericht en eventuele bijlage daarbij aan de afzender terug te sturen en alle kopien ervan te vernietigen.

De P.C. Hooft Groep BV scant de uitgaande berichten op virussen, maar kan niet aansprakelijk worden gesteld in geval dit e-mailbericht en/of enige bijlage wel een virus bevat. De P.C. Hooft Groep BV kan op geen enkele wijze verantwoordelijk of aansprakelijk worden gehouden voor en/of in verband met de gevolgen van en/of schade ontstaan door het onjuist, onvolledig en/of niet-tijdig versturen en ontvangen van de inhoud van dit bericht.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to