How to fill form fields with silverPdf?

Aug 30, 2011 at 9:31 AM

Hello everybody! I have this problem using silverPdf. I download a pdf file from Internet, then I load this inside a PdfDocument instance:
PdfDocument document = PdfReader.Open(pdfStream, PdfDocumentOpenMode.Modify);

Now I need to fill same form fields inside this document, and save locally on my PC. I use this code:
document.AcroForm.Fields["field_name"].ReadOnly = false;
document.AcroForm.Fields["field_name"].Value = new PdfString("same_value");
document.AcroForm.Fields["field_name"].ReadOnly = true;
document.Save("C:\Documents\Test.pdf", true);

This code runs without any error, but when I open final pdf all the form fields seems to be empty.
What's the reason? What I need to do to successfully fill form fields with silverpdf?
Is this operation supported by this library?

Thanks a lot!