Thanks for catching that bug, Paulo.  Here is a revised version of
ColumnText that handles composite elements correctly (I think :).  At least
I have a simple test case that failed before and now works.  I also changed
ColumnText.duplicate to use setACopy (just avoiding a small amount of code
duplication).

I added the code to copy the useAscender flag directly to the goComposite
method since that is how everything else is copied.  Would it be better to
use setACopy to copy all of the ColumnText fields, then override a few with
parameters from the added Element?  It would be nice to have the bulk of
parameter copying in one place.

Thanks again for pointing out the problem.

----- Original Message ----- 
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: "Steve Appling" <[EMAIL PROTECTED]>; "iText Mailing List"
<[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 11:38 AM
Subject: RE: [iText-questions] Vertical alignment in PdfPCells


A composite element is an element added with ColumntText.addElement(),
it's the same with PdfPCell. The processing is done in
ColumnText.goComposite(). If firstPass == true and it's a Paragraph or a
List you'll have to pass to the constructed ColumnText the Ascent flag.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Steve Appling [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 21, 2004 3:51 PM
> To: Paulo Soares; iText Mailing List
> Subject: Re: [iText-questions] Vertical alignment in PdfPCells
>
> I'll be glad to try fix any problems with this, but I'm not
> sure exactly
> what you mean by composite elements (which is probably why I
> didn't handle
> it right originally :).  If you can describe the problem
> condition enough
> for me to make a test case, I'll work on it.
>
> > ----- Original Message ----- 
> > From: "Paulo Soares" <[EMAIL PROTECTED]>
> > To: "Steve Appling" <[EMAIL PROTECTED]>; "iText Mailing List"
> <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 21, 2004 9:51 AM
> >Subject: RE: [iText-questions] Vertical alignment in PdfPCells
> >
>
> > Good work. It needs some changes to support composite
> elements, though.
> >
> > Best Regards,
> > Paulo Soares
>
>
>

Attachment: ColumnText.java
Description: java/

Reply via email to