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".
<field access="readOnly">
will make the field read only.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.