I am evaluating the tool. As a test I have a PDF Form that I want to fill data and save. Code below....
I get error on the Form Fields .Value = line...it cannot find the field. The PDF form was created in Acrobat Designer 7.
MergeDocument document = new MergeDocument(@"C:\PDFTemplate\EPA-DynamicPDF.pdf");
// Set the field values
document.Form.Fields["txtDocNumber"].Value = "My Text"; // TextBox field
// Save the PDF
document.Draw(@"C:\PDFTemplate\EPA-DynamicPDF.pdf");
Error when setting Form Field value
Re: Error when setting Form Field value
Support · May 1, 2009Hello,
You can fill the form fields with the textbox values using the full name of the form field without any problem.
pdfDoc.Form.Field["FormFieldName"].Value = textBoxId.Text;
The Adobe Designer typically names the child fields by appending numbers to the name with a parent and child relationship.
You will have to use the full names of the form fields in order to fill them. You can use the FormFieldReader example to know the full names of the form fields of your PDF by using your PDF as a template.
Thanks,
ceTe Software Support Team