Bruno Lowagie wrote:
>I'm not sure if I understand the requirements.
>That makes it hard to help you.
First up, thanks to Paulo and yourself for a great tool and for your book.
Your reply helps with the footers issue and I understand what you say
about setting the margins. I think my problem is conceptual - I haven't
got a clue :-).
Let me describe the scenario.
I have a PDF file - quote.pdf which I created with Acrobat 7 (saved as
Abobe 6 Static) from a MS-Word document. It has a logo and some
boilerplate text alongside which I stamp some values. That works fine.
Below this I want to add some PDFTables and a footer. From your reply I
understand that I should set the margins to constrain the table to be
between the 'header' (non-repeating) and the footer.
What I have tried is using a single Document and OutputStream. The fields
were filled in but no tables.
I tried to create a merged PDF then open it as a new Document with a new
OutputStream and add the tables. Here's what the code looks like...
PdfReader reader = new PdfReader(mergedfile);
OutputStream os2 = new FileOutputStream("Quotation.pdf");
PdfStamper stamper = new PdfStamper(reader, os2);
this.budgetQuoteDocument = new
com.lowagie.text.Document(PageSize.A4,72,72, 324,144);
PdfWriter.getInstance(this.budgetQuoteDocument, os2);
this.budgetQuoteDocument.open();
buildItemsTable(); // creates a table - honest!
os2.flush();
stamper.close();
Unfortunately the resulting file is the merged file to which I want to add
a couple of tables and a footer. Ideally I would prefer to just have one
output stream...
cheers,
Gerry
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/