Designer forms are not supported.

Paulo

----- Original Message ----- From: "Rob Trahan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 17, 2006 6:31 AM
Subject: [iText-questions] Pdfstamper can't find fields.


Hello, I'm struggling to use the pdfstamper to fill text fields on a simple pdf.

I'm doing this in C#.  What I've done is made a simple pdf document in
Acrobat 7 pro using their designer. The text field's name is
textfield1.

My code is as follows:

string formFile = @".\InputPDF.pdf";
string newFile = @".\OutputPDF.pdf";

PdfReader reader = new PdfReader(formFile);
PdfStamper stamper = new PdfStamper(reader, new
FileStream(newFile,FileMode.Create));

AcroFields fields = stamper.AcroFields;
String fName = fields.GetField("textfield1");
textBox1.Text = "Field name is: " + fName;

if (fields.SetField("textbox1", "doe"))
{
         textBox1.Text += "   ...Field was set";
}
else
{
          textBox1.Text += "    ...Not set.";
}

The field never gets set.  If I debug, under the form object I can see
a hashtable having a key of "form[0].textbox[0]", I've tried accessing
it with that string as well, and still get nothing.

Note that I'm not using an FDF, but have seen examples without, using
SetField instead for SetFields.

I really do not want to have to build the pdf by hand using the other
iText methods.  What might I be doing wrong?

Thanks,
Rob


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to