Jesus Mercado wrote:
Hello,
My situation is as follows. I have one pdf file name ScheduleA.pdf and
it contains an Acroform with various fields. Thru a program I need to
load that page a certain number of times set the values for the
acrofields and then concatonate all the SchedulesA.pdf files of that
run. So basicly I will end up with one pdf document containing various
ScheduleA files inside it and each with diferent data on its Acrofields.
First of all you need to create the final PDF in 'different passes'.
The different passes will depend on the end result you desire.
If the end result needs to be a form, you must indeed use
pdfcopyfields BUT you have to rename all the fields.
If you just concatenate the same form over and over again,
you can't add different data to fields with the same name.
I suppose the end result may be a flattened PDF.
This is: a PDF with the data in read-only form (there is
no longer a form).
To achieve this, you need to write a loop.
Outside the loop, you create a pdfcopy object to
which you will add different existing PDF files.
Inside the loop, you create a pdfstamper object that
writes a temporary PDF document to memory.
This temporary PDF document is one ScheduleA.pdf
that is filled in and flattened. As soon as the stamper
is closed you create a pdfreader with the bytes of
this PDF that was generated in memory and you add
it to your pdfcopy object.
I hope this helps,
Bruno
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions