Greetings. I am receiving an error when trying to fill in an existing PDF's form fields, but I'm not sure what it means. I was wondering if anyone here could shed some light on the error message.
The error message reads: "The size of the XPdfForm is to small. Parameter Name: size."
The offending code is found in the if statement of the following code block, where "fields" is a PdfAcroFieldCollection and "FFELPForm" is an ASP Wizard control.
Code:
PdfAcroField fNonLoanCode = fields["NonLoanCode" + i.ToString()];
if ((txtField = fNonLoanCode as PdfTextField) != null) { txtField.Text = ((DropDownList)FFELPForm.FindControl( "NonLoanCode" + i.ToString() )).SelectedValue; }
I'm not sure what property of the PDF document the error refers to; is it the actual pixel width of field? Is it the allowed characters of the field? Etc. At the point the error is thrown, the "SelectedValue" that I'm trying to fill the field with is only two characters long.
Any ideas?