Hi,

I think, ther is a bug in the method addImage of
com.lowagie.text.pdf.PdfCell :

switch (image.alignment() & Image.MIDDLE) {
   case Image.RIGHT:
       left = right - image.scaledWidth();
       break;
   case Image.MIDDLE:
       left = left + ((right - left - image.scaledWidth()) / 2f);
       break;
   case Image.LEFT:
   default:
}

will never handle the case Image.RIGHT because Image.RIGHT=2 and
Image.MIDDLE=1 and 1&2=0. In my opinion, this ist the correct code :

switch (image.alignment() & (Image.MIDDLE | Image.RIGHT)) {
   case Image.RIGHT:
       left = right - image.scaledWidth();
       break;
   case Image.MIDDLE:
       left = left + ((right - left - image.scaledWidth()) / 2f);
       break;
   case Image.LEFT:
   default:
}

Regards,
Uwe Zimmermann




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to