SetFormFieldValue

Form fields

Description

Sets the initial value of a form field. The appearance stream for the form field is generated if

SetNeedAppearances(1) has been called.

Syntax

Delphi

function TPDFlib.SetFormFieldValue(Index: Integer; Const NewValue: WideString): Integer;

ActiveX

Function PDFlib::SetFormFieldValue(Index As Long, NewValue As String) As Long

DLL

int DLSetFormFieldValue(int InstanceID, int Index, wchar_t * NewValue);

Parameters

IndexThe index of the required form field. The first form field has an index of 1.
NewValueThe new value of the form field. For multi-line text fields you can use Chr(13) or Chr(13) + Chr(10) to force a line break.

Return values

0Could not find the specified form field
1The default value of the form field was set successfully