Hello,

I have a pdf model with several fields to fill in. The
idea is to load the model, add it to my pdf and fill
in the fields with the appropriate data (returned by a
SQL).

I'm currently using this code:
// Init
PdfReader reader = new PdfReader(@"d:\model_uk.pdf");
FileStream Output = new FileStream(@"d:\output.pdf",
FileMode.Create);
PdfStamper stamp1 = new PdfStamper(reader, Output);
// First page
AcroFields form1 = stamp1.AcroFields;
form1.SetField("Date", "10/10/2005");
form1.SetField("Communication", "002/0014/35150");
stamp1.Close();
// Second page
stamp1 = new PdfStamper(reader, Output);
form1 = stamp1.AcroFields;
form1.SetField("Date", "11/10/2005");
form1.SetField("Communication", "001/0014/35150");
stamp1.Close();


It doesn't work and return this message right after my
"Second Page" comment:  "The original document was
reused. Read it again from file".

So my question: how would I add several times the same
page to my output pdf and fill the fields on the fly ?

Thanking you in advance.

Fabio


        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to