well you were kinda right actually.

Just before I did a contentByte.setHorizontalScaling(64) and did an endText. Forgot to set the scaling back to 100.
Seams like when the scaling is below 100% the alignment are screwed up. (For center and right one)


:)

Jean-Philippe B�langer
CGI



Paulo Soares wrote:

I find it very hard to believe that it aligns CENTER but not RIGHT. Check
that your labelDef.getAlignment() really returns RIGHT and that
labelDef.getPosX() has the same value in both lines. If it still doesn't
work, post a small complete example with hardcoded values with the problem.

Best Regards,
Paulo Soares

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 23, 2004 15:00
Subject: [iText-questions] Printing text with Right align?




Hi,

I'm currently hitting a wall with text alignment. So far CENTER and LEFT
align is working nicely. but the right align is screwed up.

here is what I'm doing.

               cb.beginText();
               cb.setFontAndSize(bf, labelDef.getFontSize());
               cb.showTextAligned(labelDef.getAlignment(),
labelDef.getLabelFr(), labelDef.getPosX(),
document.getPageSize().height() - labelDef.getPosY(), 0);
               cb.endText();

I have two label on two lines. each of them are aligned right with the
same Pivot X. Normally they should be aligned right. But seams like the
size of the text is having an effect on the result. the longer the
string the farther it is from beind aligned.

Any tip on this?

I tried ColumnText too with no luck.

Jean-Philippe


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions





------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions





-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to