showTextAligned() works with a single line. If you want multiline and a few
other tricks use ColumnText.

Best Regards,
Paulo Soares

----- Original Message -----
From: "Mitter Florian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 13:54
Subject: [iText-questions] 'Advanced iText' - Aligning Text


> Hi,
>
> I was trying to right-align some text using the PdfContentByte class but
> I
> didn't manage to to so.
>
> My code looks like this:
>
> [Code]
>     cb.beginText();
>     cb.setFontAndSize(...);
>     cb.setLeading(...);
>     cb.showTextAligned(PdfContentByte.ALIGN_RIGHT, ...);
>     cb.newlineShowText(...);
>     ...
>     cb.endText();
> [/Code]
>
> It seems like the function-call "showTextAligned()" is not enough to
> align
> the whole block to the right but if I just use "showTextAlign()" for
> each
> line I've to calculate the absolute position for every line.
>
> Can anyone tell me what I've done wrong?
>
> Thanks a lot,
> Florian Mitter
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01
> /01
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to