SetFormValues

Form fields

Description

Applies form values by exact case-sensitive field name

Returns the number of fields written and ignores names not present in the document

Syntax

Delphi

Function SetFormValues(Const Values: Array Of TPDFlibFormValue; SkipReadOnly: Boolean= True): Integer;

Parameters

ValuesArray of TPDFlibFormValue records pairing a field name with its new value; names are matched exactly and case-sensitively against the document field titles, and names absent from the document are ignored
SkipReadOnlyTrue, the default, leaves read-only fields untouched; False force-writes every matched field, including locked ones

Return values

Non-zeroNumber of fields that received their value
0No document is loaded, the document has no form fields, no name matched, or every matched field was read-only while SkipReadOnly was set