----- Original Message -----
From: "Mitter Florian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 03, 2003 19:06
Subject: [iText-questions] PdfPTable Bottom y-coordinate


> Hi,
>
> Is there a chance to figure out the y-coordinate of the bottom of a
> PdfPTable after adding it to a document?
>

A PdfPTableEvent will give you that info.

> I know that PdfPTable's writeSelectedRows()-function returns the yPos of
> the
> bottom of the table, but using this function means worrying about the
> page-breaks by myself (how do I handle that?).
>

Simple math.

> Another possibility is to use Table instead of PdfPTable (I prefer the
> latter) and use the writer's getTableBottom()-function. I tried this and
> the
> function returned '-61' (the table finished at about 2/3 of the page)
> and I
> couldn't figure out what that number meant.
>
> Why do I have to know that? I've got the following situation:
> I have two tables. The first contains one to a few hundred rows with
> data.
> The second table should be at the bottom of the last page containing
> additional information. If the first table ends at the bottom of a page
> and
> there's no more space for the second table, the latter should start at
> the
> top of the next page (instead of sitting at the bottom).
> Maybe anyone has a better idea than calculating whether there's enough
> space
> to put the second table on the last page or there's a need for another
> page
> containing the second table.
>

Other solution: put the second table inside a single column table and add
the outer table to the document. The inner table won't be splitted.

Best Regards,
Paulo Soares




-------------------------------------------------------
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