Hi

I've developed a small set of classes which produce various types of
document output from our system.

One of the settings I'm working on is the ability to select which pages
should display Letterheads. If a page has a letterhead, then the margin
must be increased before the page is written to, and then the content added
onEndPage.

the problem I have is that sometimes, the letterhead is only required on
the first and last pages (for example). The first page is easy - but I have
a problem with the last page.

The code setting the margins on each new page doesn't know that a page is
the last page, but the code doing the headers does, as all items have been
sent via pdfDoc.add().

What can I do to test for it being the last before the data is written?
I've seen writer.fitsOnPage(PdfPTable), but I'll have a number of
PdfPTables to check, and possibly some phrases too.

What I'm thinking is that I should form a queue of all items to add, and
before each page, nest the available items within a single cell PdfPTable
and check fits on Page. If true, then its the last page. But what if it's
splitting a table already - will that be taken into account in fitsOnPage?

Any ideas would be gratefully received.

Best regards

Kieran




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to