THotPDF.SetFormFieldReadOnly Method
Sets or clears the ReadOnly bit of a loaded AcroForm field selected by index or field name
Declaration
procedure SetFormFieldReadOnly(FieldIndex: Integer; ReadOnly: boolean); overload;
procedure SetFormFieldReadOnly(const FieldName: AnsiString; ReadOnly: boolean); overload;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | Zero-based index of the loaded form field |
FieldName | Qualified name of the loaded form field for the name overload |
ReadOnly | True to set ReadOnly, False to clear it |
Return value
This member does not return a value
Both the index and field-name overloads toggle only ReadOnly in the effective field mask, preserving every other bit, including high bits, when saving and reloading
See AcroForm field flag precision for signed mask values, inheritance and native builder behavior
Usage notes
- Use this API in the AcroForm workflow before the affected page, resource, field, or catalog object is finalized
- Keep object names, field names, resource names, and returned handles stable until the document is finalized