Hi,
I need to be able to do the following: read in a pdf document, populate all the fields and then display this file in a separate browser window and make sure these fields cannot be edited by the user.
Here is what I'm doing:
form.FillField("form1[0].#subform[0].TextField1[1]", "7788");
form.SetFieldAttribute("form1[0].#subform[0].TextField1[1]", FieldFlag.READ_ONLY);
The populating works fine. However, I'm getting a message that form.SetFieldAttribute is obsolete. I checked your online documentation and the section about making a field read-only uses the form.SetFieldAttribute() function.
I'm already using the form object to read in the pdf, edit all the fields and then send the document to memory stream. Do I also need to use the FormEditor class? Is there any way to make the whole document uneditable as a whole withouth having to go through each and every field? On your website you say that FormEditor only works for AcroForm fields. Is this still true? How do I find out whether my pdf belongs to AcroForm or XfaForm? If it is XfaForm, what do I need to do them to lock all the fields?
thanks