It seems that when an image is too wide and one specifies center
alignment,
it is in fact aligned left, so that there's a margin and no cropping at
left.

-----Original Message-----
From: Mark Hall [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 23, 2005 9:30 AM
To: itext-questions@lists.sourceforge.net
Cc: Mato Mira, Fernando (DIA EMEA/A)
Subject: Re: [iText-questions] images in RTF not aligning properly

On Wednesday 22 June 2005 16:43, [EMAIL PROTECTED] wrote:
>    I am using the setAligment() method with arguments of Image.LEFT,
> Image.MIDDLE, and Image.RIGHT, and it works
>
> properly only if the image is the last element added to the page. Any
> ideas to what the problem could be?
If you add multiple images directly to the document one after the other,
then 
they belong to the same paragraph. One paragraph can only have one
alignment 
and that is usually the last alignment that is set.

If you want to have them differently aligned you need to wrap them in 
paragraphs. Also using Element.ALIGN_XXX alignments. Unfortunately there
is 
currently a bug in that the alignment of the paragraph is not passed on
to 
images in the paragraph, so you have to set the alignment of both the 
paragraph and the image. Then it works.

Greetings,
Mark
-- 
"The Computer made me do it."

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to