Can't figure out how to fill form fields

Aug 4, 2011 at 6:29 PM
Edited Aug 4, 2011 at 6:34 PM


I am trying to take an included (resource) PDF with a form field, copy it to a new , output PDF , fill the form, save. 

I can copy to output and save, but I cannot use silverpdf correctly to fill the form field in.  I messed around for 2-3 days and finally decided to ask for help.

Using some example code, can anyone show me how to fill a form field in?  The field name (as read using acrobat pro) is "newhire". 


EDIT = also, how to flatten pdf before saving? (so no one can modify fields)

Thank you!

Aug 25, 2011 at 1:42 AM

You ever figure this out?  I don't know how to fill in a field?  Please help.

Aug 30, 2011 at 9:24 AM

I have same problem here. I use this code:

PdfDocument document = PdfReader.Open(pdfStream, PdfDocumentOpenMode.Modify);
document.AcroForm.Fields["field_name"].ReadOnly = false;
document.AcroForm.Fields["field_name"].Value = new PdfString(value);
document.AcroForm.Fields["field_name"].ReadOnly = true;

The code runs well, but when I save PdfDocument locally on my PC, all the form fields appears to be empty.

Any suggestion, please?