How can I set field "read only" in PDF using XFA and iTextSharp? I know that I have to modify the XML, but I don't know which attribute/value to set.
var attr = xfa.DomDocument.CreateAttribute("fflags");
attr.Value = "1";
xfa.DomDocument.GetElementsByTagName("my_field")[0].Attributes.Append(attr);
I haven't used iTextSharp but the attribute in XFA that you are looking for is the
access
attribute on the field. And the value is "readOnly".will make the field read only.