InJesus wrote:
> I aplogize in advance if somebody has answer this already,
The answer is in the book, but in the meanwhile,
some even better answers have come up (due to
enhancements in the latest iText versions).
> I need to take a one page template, populate it with AcroForm data then do
> it again several times then combine them as one PDF. as Copy doesn't have
> AcroForms and Stamper doesn't deal with multiple pages I'm not sure what to
> do.
The answer is: combine both.
while more data do {
- Create a PDF in memory (ByteArrayOutputStream) with PdfStamper.
- Add it to another PDF with PdfCopy.
}
Downside: the PDF created with PdfCopy will be very large.
Remedy 1: use PdfSmartCopy instead of PdfCopy.
Remedy 2: use PdfWriter to do everything
The original solution and remedy 2 are described here:
http://itext.ugent.be/articles/eid-pdf/index.php#template
Remedy 1 is advised but not yet documented.
However, it's very easy to implement: just replace PdfCopy
with PdfSmartCopy in de code of the original solution.
best regards,
Bruno
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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/