Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

Re: [iText-questions] Rigth_alignment in PdfPCells does not work in
v  2.0.4???

Bruno

2007-08-01

Replies:

Andreas Reuss Christensen wrote:
> Both the Cells align left?????!!!!!!!!!

> What do I do wrong?

You are mixing 'text mode' and 'composite mode'.
In 'text mode', the cell follows the settings of the cell
For instance: cell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);
causes the content to be right aligned.
In 'composite mode', the cell follows the settings of
the content. For instance: the alignment of the cell will
be ignored if you use addElement().

This is explained on page 168 of 'iText in Action'
(and more in detail on p205).
br,
Bruno

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
©2008 junlu.com - Jax Systems, LLC, U.S.A.