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

NamePurpose
FieldIndexZero-based index of the loaded form field
FieldNameQualified name of the loaded form field for the name overload
ReadOnlyTrue 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 behaviour

Usage notes

Related APIs