PDFix SDK  6.5.0
PdfFormField Struct Referenceabstract

PdfFormField class. More...

Public Member Functions

virtual PdfFieldType GetType ()=0
 Gets the type of field. More...
 
virtual PdfFieldFlags GetFlags ()=0
 Gets the form field's flags. More...
 
virtual bool SetFlags (PdfFieldFlags flags)=0
 Sets the form field's flags. More...
 
virtual int GetValue (wchar_t *buffer, int len)=0
 Gets the field's value as string. More...
 
virtual bool SetValue (const wchar_t *value)=0
 Sets the field's value as string. Multiple values should be comma-separated. More...
 
virtual int GetDefaultValue (wchar_t *buffer, int len)=0
 Gets the field's default value as string. More...
 
virtual int GetFullName (wchar_t *buffer, int len)=0
 Gets the field's full name within the document AcroForm field tree. More...
 
virtual int GetTooltip (wchar_t *buffer, int len)=0
 Gets the field's tooltip. More...
 
virtual int GetNumOptions ()=0
 Gets the number of elements in the Opt array. More...
 
virtual int GetOptionValue (int index, wchar_t *buffer, int len)=0
 Gets the field's option value. More...
 
virtual int GetOptionCaption (int index, wchar_t *buffer, int len)=0
 Gets the field's option caption. More...
 
virtual PdfActionGetAction ()=0
 Gets a field's action object. More...
 
virtual PdfActionGetAAction (PdfActionEventType event)=0
 Gets a field's additional action object. More...
 
virtual int GetMaxLength ()=0
 Gets maximum length of the field's text, in characters. More...
 
virtual int GetWidgetExportValue (PdfAnnot *annot, wchar_t *buffer, int len)=0
 Gets the field's widget export value. More...
 
virtual PdsDictionaryGetObject ()=0
 Gets the field's dictionary object. More...
 
virtual int GetNumExportValues ()=0
 Gets the number of field's export values of the radio button and check box field. More...
 
virtual int GetExportValue (int index, wchar_t *buffer, int len)=0
 Gets the field's export value for n-th widget of the form field. More...
 

Detailed Description

PdfFormField class.

PdfFormField object represents interactive form dictionary that shall be referenced from the AcroForm entry in the document catalogue

Member Function Documentation

◆ GetAAction()

virtual PdfAction* PdfFormField::GetAAction ( PdfActionEventType  event)
pure virtual

Gets a field's additional action object.

Parameters
eventThe event which additional action to get.
Returns
The annotation's additional action object or nullptr if annotation does not have an action for specified event type.
See also
GetAction

◆ GetAction()

virtual PdfAction* PdfFormField::GetAction ( )
pure virtual

Gets a field's action object.

Returns
The annotation's action object or nullptr if annotation does not have an action.
See also
GetAAction

◆ GetDefaultValue()

virtual int PdfFormField::GetDefaultValue ( wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's default value as string.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetExportValue()

virtual int PdfFormField::GetExportValue ( int  index,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's export value for n-th widget of the form field.

Parameters
indexthe index of the widget in the form field
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.
See also
GetNumExportValues

◆ GetFlags()

virtual PdfFieldFlags PdfFormField::GetFlags ( )
pure virtual

Gets the form field's flags.

Returns
The form field's flags.

◆ GetFullName()

virtual int PdfFormField::GetFullName ( wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's full name within the document AcroForm field tree.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetMaxLength()

virtual int PdfFormField::GetMaxLength ( )
pure virtual

Gets maximum length of the field's text, in characters.

Returns
The maximum number of characters.

◆ GetNumExportValues()

virtual int PdfFormField::GetNumExportValues ( )
pure virtual

Gets the number of field's export values of the radio button and check box field.

Returns
The number of the export values of the form field.
See also
GetExportValue

◆ GetNumOptions()

virtual int PdfFormField::GetNumOptions ( )
pure virtual

Gets the number of elements in the Opt array.

Returns
Number of field's options.

◆ GetObject()

virtual PdsDictionary* PdfFormField::GetObject ( )
pure virtual

Gets the field's dictionary object.

Returns
The requested field object.

◆ GetOptionCaption()

virtual int PdfFormField::GetOptionCaption ( int  index,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's option caption.

Parameters
indexThe index of option to retrieve.
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetOptionValue()

virtual int PdfFormField::GetOptionValue ( int  index,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's option value.

Parameters
indexThe index of option to retrieve.
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetTooltip()

virtual int PdfFormField::GetTooltip ( wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's tooltip.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetType()

virtual PdfFieldType PdfFormField::GetType ( )
pure virtual

Gets the type of field.

Returns
The form field type.

◆ GetValue()

virtual int PdfFormField::GetValue ( wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's value as string.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetWidgetExportValue()

virtual int PdfFormField::GetWidgetExportValue ( PdfAnnot annot,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the field's widget export value.

Parameters
annotThe widget annotation that holds the export value
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ SetFlags()

virtual bool PdfFormField::SetFlags ( PdfFieldFlags  flags)
pure virtual

Sets the form field's flags.

Returns
true if the FormField's flags was set successfully.

◆ SetValue()

virtual bool PdfFormField::SetValue ( const wchar_t *  value)
pure virtual

Sets the field's value as string. Multiple values should be comma-separated.

Parameters
bufferThe new form field string value
Returns
true if succeeded, false otherwise. Sample SetFormFieldValue