Foxit PDF SDK
FSDK.Filler Class Reference

Public Member Functions

 constructor (form, assist)
 Constructor. More...
 
 GetEditingTextCaretPosition (matrix)
 Get the text caret position when the text field or combo box is in the editing state. More...
 
 HighlightFormFields (is_highlight)
 Decide whether to highlight form fields (including signature fields) or not. More...
 
 HighlightFormFields (is_highlight, is_sign_highlight)
 Decide whether to highlight signature fields and other form fields or not. More...
 
 IsEmpty ()
 Check whether current object is empty or not. More...
 
 KillFocus ()
 Kill focus from form. More...
 
 OnChar (key_code, flags)
 Call this function when a character code is about to be inputted to a form field. More...
 
 OnCopy ()
 Call this function when the popup menu item "Copy" is down. More...
 
 OnCut ()
 Call this function when the popup menu item "Cut" is down. More...
 
 OnDelete ()
 Call this function when the popup menu item "Delete" is down. More...
 
 OnKeyDown (key_code, flags)
 Call this function when key on the keyboard is down. More...
 
 OnKeyUp (key_code, flags)
 Call this function when key on the keyboard is up. More...
 
 OnLButtonDoubleClick (page, point, flags)
 Call this function when left mouse button is double clicked. More...
 
 OnLButtonDown (page, point, flags)
 Call this function when left mouse button is down. More...
 
 OnLButtonUp (page, point, flags)
 Call this function when left mouse button is up. More...
 
 OnMouseEnter (page, point, flags)
 (Reserved, unsupported yet) Call this function when mouse enters somewhere. More...
 
 OnMouseHover (page, point, flags)
 (Reserved, unsupported yet) Call this function when mouse hovers somewhere. More...
 
 OnMouseLeave (page, point, flags)
 (Reserved, unsupported yet) Call this function when mouse leaves somewhere. More...
 
 OnMouseMove (page, point, flags)
 Call this function when mouse moves. More...
 
 OnMouseWheel (page, point, delta, flags)
 (Reserved, unsupported yet) Call this function when mouse wheel moves. More...
 
 OnPaste ()
 Call this function when the popup menu item "Paste" is down. More...
 
 OnRButtonDoubleClick (page, point, flags)
 (Reserved, unsupported yet) Call this function when right mouse button is double clicked. More...
 
 OnRButtonDown (page, point, flags)
 Call this function when right mouse button is down. More...
 
 OnRButtonUp (page, point, flags)
 Call this function when right mouse button is up. More...
 
 OnSelectAll ()
 Call this function when the popup menu item "Select All" is down. More...
 
 OnWheelButtonDoubleClick (page, point, flags)
 (Reserved, unsupported yet) Call this function when mouse wheel button is double clicked. More...
 
 OnWheelButtonDown (page, point, flags)
 (Reserved, unsupported yet) Call this function when mouse wheel button is down. More...
 
 OnWheelButtonUp (page, point, flags)
 (Reserved, unsupported yet) Call this function when mouse wheel button is up. More...
 
 Render (page, matrix, renderer)
 Draw the currently focused form control on the page. More...
 
 SetFocus (control)
 Set focus on a form control. More...
 
 SetHighlightColor (color)
 Set the highlight color used for highlighting form fields. More...
 
 ShowOverflowIndicator (is_show_overflow_indicator)
 Decide whether to show the overflow indicator when the text in text field overflow. More...
 

Public Attributes

 e_VkeyNumpad0
 0 key in the numeric keypad.
 

Static Public Attributes

static e_EventFlagAltKey
 Event flag: "Alt" key.
 
static e_EventFlagAutoRepeat
 Event flag: auto repeat.
 
static e_EventFlagCommand
 Event flag: the command key.
 
static e_EventFlagControlKey
 Event flag: "Ctrl" key.
 
static e_EventFlagKeyPad
 Event flag: key pad.
 
static e_EventFlagLeftButtonDown
 Event flag: the left button of the mouse is down.
 
static e_EventFlagMetaKey
 Event flag: meta key.
 
static e_EventFlagMiddleButtonDown
 Event flag: the middle button of the mouse is down.
 
static e_EventFlagRightButtonDown
 Event flag: the right button of the mouse is down.
 
static e_EventFlagShiftKey
 Enumeration for key event flags. More...
 
static e_Vkey0
 0 key.
 
static e_Vkey1
 1 key.
 
static e_Vkey2
 2 key.
 
static e_Vkey3
 3 key.
 
static e_Vkey4
 4 key.
 
static e_Vkey5
 5 key.
 
static e_Vkey6
 6 key.
 
static e_Vkey7
 7 key.
 
static e_Vkey8
 8 key.
 
static e_Vkey9
 9 key.
 
static e_VkeyA
 A key.
 
static e_VkeyAdd
 Plus key in the numeric keypad.
 
static e_VkeyB
 B key.
 
static e_VkeyBack
 Backspace key.
 
static e_VkeyC
 C key.
 
static e_VkeyControl
 Ctrl key.
 
static e_VkeyD
 D key.
 
static e_VkeyDecimal
 Dot key in the numeric keypad.
 
static e_VkeyDelete
 Delete key.
 
static e_VkeyDivide
 Slash key in the numeric keypad.
 
static e_VkeyDown
 Down arrow key.
 
static e_VkeyE
 E key.
 
static e_VkeyEnd
 End key.
 
static e_VkeyEscape
 ESC key.
 
static e_VkeyF
 F key.
 
static e_VkeyF1
 F1 key.
 
static e_VkeyF10
 F10 key.
 
static e_VkeyF11
 F11 key.
 
static e_VkeyF12
 F12 key.
 
static e_VkeyF2
 F2 key.
 
static e_VkeyF3
 F3 key.
 
static e_VkeyF4
 F4 key.
 
static e_VkeyF5
 F5 key.
 
static e_VkeyF6
 F6 key.
 
static e_VkeyF7
 F7 key.
 
static e_VkeyF8
 F8 key.
 
static e_VkeyF9
 F9 key.
 
static e_VkeyG
 G key.
 
static e_VkeyH
 H key.
 
static e_VkeyHelp
 Help key.
 
static e_VkeyHome
 Home key.
 
static e_VkeyI
 I key.
 
static e_VkeyInsert
 Insert key.
 
static e_VkeyJ
 J key.
 
static e_VkeyK
 K key.
 
static e_VkeyL
 L key.
 
static e_VkeyLeft
 Left arrow key.
 
static e_VkeyM
 M key.
 
static e_VkeyMenu
 Menu key.
 
static e_VkeyMultiply
 Multiply key in the numeric keypad.
 
static e_VkeyN
 N key.
 
static e_VkeyNext
 Page Down key.
 
static e_VkeyNumpad1
 1 key in the numeric keypad.
 
static e_VkeyNumpad2
 2 key in the numeric keypad.
 
static e_VkeyNumpad3
 3 key in the numeric keypad.
 
static e_VkeyNumpad4
 4 key in the numeric keypad.
 
static e_VkeyNumpad5
 5 key in the numeric keypad.
 
static e_VkeyNumpad6
 6 key in the numeric keypad.
 
static e_VkeyNumpad7
 7 key in the numeric keypad.
 
static e_VkeyNumpad8
 8 key in the numeric keypad.
 
static e_VkeyNumpad9
 9 key in the numeric keypad.
 
static e_VkeyO
 O key.
 
static e_VkeyP
 P key.
 
static e_VkeyPause
 Pause Break key.
 
static e_VkeyPrint
 Print key.
 
static e_VkeyPrior
 Page Up key.
 
static e_VkeyQ
 Q key.
 
static e_VkeyR
 R key.
 
static e_VkeyReturn
 Enter key.
 
static e_VkeyRight
 Right arrow key.
 
static e_VkeyS
 S key.
 
static e_VkeySeparator
 Enter key in the numeric keypad.
 
static e_VkeyShift
 Shift key.
 
static e_VkeySnapshot
 Print Screen key.
 
static e_VkeySpace
 Space key.
 
static e_VkeySubtractv
 Minus key in the numeric keypad.
 
static e_VkeyT
 T key.
 
static e_VkeyTab
 Tab key.
 
static e_VkeyU
 U key.
 
static e_VkeyUnknown
 Enumeration for virtual key code. More...
 
static e_VkeyUp
 Up arrow key.
 
static e_VkeyV
 V key.
 
static e_VkeyW
 W key.
 
static e_VkeyX
 X key.
 
static e_VkeyY
 Y key.
 
static e_VkeyZ
 Z key.
 

Detailed Description

This class represents a form filler used for filling PDF form. There should be only one form filler object for an interactive form, so do not construct form filler for one FSDK.Form object more than one time. User is recommended to implement an FSDK.ActionCallback and set it to Foxit PDF SDK by function FSDK.Library.SetActionCallback, in order to implement more features of form filler.

See also
FSDK.Library

Member Function Documentation

◆ constructor()

FSDK.Filler.constructor ( form  ,
assist   
)

Constructor.

There can be only one form filler for a form.

Parameters
[in]formA valid PDF form.
[in]assistAn assistant callback class for form filler. This should be implemented by user and should not be null.

◆ GetEditingTextCaretPosition()

FSDK.Filler.GetEditingTextCaretPosition ( matrix  )

Get the text caret position when the text field or combo box is in the editing state.

Parameters
[in]matrixA matrix used to transform the returned position to device coordinate system.
Returns
A position of the top of the text caret in device coordinate system.
(-1,-1) means that there are no text field or combo box in the editing state.

◆ HighlightFormFields() [1/2]

FSDK.Filler.HighlightFormFields ( is_highlight  )

Decide whether to highlight form fields (including signature fields) or not.

All types of form fields can be highlighted except push button fields. If this function is not called, Foxit PDF SDK will highlight all form fields (including signature fields) by default.

Parameters
[in]is_highlighttrue means to highlight form fields (including signature fields), and false means not to highlight form fields (including signature fields).
Returns
None.

◆ HighlightFormFields() [2/2]

FSDK.Filler.HighlightFormFields ( is_highlight  ,
is_sign_highlight   
)

Decide whether to highlight signature fields and other form fields or not.

All types of form fields can be highlighted except push button fields. If this function is not called, Foxit PDF SDK will highlight all form fields by default apart from signature fields which are not highlighted by default.

Parameters
[in]is_highlightThis boolean value is used for non-signature fields: true means to highlight form fields, and false means not to highlight form fields.
[in]is_sign_highlightThis boolean value is used only for siganture fields: true means to highlight signature fields, and false means not to highlight signature fields.
Returns
None.

◆ IsEmpty()

FSDK.Filler.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ KillFocus()

FSDK.Filler.KillFocus ( )

Kill focus from form.

Returns
true means success, while false means failure.

◆ OnChar()

FSDK.Filler.OnChar ( key_code  ,
flags   
)

Call this function when a character code is about to be inputted to a form field.

Parameters
[in]char_codeA character code, in UTF16-LE encoding.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnCopy()

FSDK.Filler.OnCopy ( )

Call this function when the popup menu item "Copy" is down.

Returns
true means success, while false means failure.

◆ OnCut()

FSDK.Filler.OnCut ( )

Call this function when the popup menu item "Cut" is down.

Returns
true means success, while false means failure.

◆ OnDelete()

FSDK.Filler.OnDelete ( )

Call this function when the popup menu item "Delete" is down.

Returns
true means success, while false means failure.

◆ OnKeyDown()

FSDK.Filler.OnKeyDown ( key_code  ,
flags   
)

Call this function when key on the keyboard is down.

Parameters
[in]key_codeThe key code. Please refer to values starting from FSDK.Filler.e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return true.

◆ OnKeyUp()

FSDK.Filler.OnKeyUp ( key_code  ,
flags   
)

Call this function when key on the keyboard is up.

Parameters
[in]key_codeThe key code. Please refer to values starting from FSDK.Filler.e_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return true.

◆ OnLButtonDoubleClick()

FSDK.Filler.OnLButtonDoubleClick ( page  ,
point  ,
flags   
)

Call this function when left mouse button is double clicked.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonDown()

FSDK.Filler.OnLButtonDown ( page  ,
point  ,
flags   
)

Call this function when left mouse button is down.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is down in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonUp()

FSDK.Filler.OnLButtonUp ( page  ,
point  ,
flags   
)

Call this function when left mouse button is up.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnMouseEnter()

FSDK.Filler.OnMouseEnter ( page  ,
point  ,
flags   
)

(Reserved, unsupported yet) Call this function when mouse enters somewhere.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnMouseHover()

FSDK.Filler.OnMouseHover ( page  ,
point  ,
flags   
)

(Reserved, unsupported yet) Call this function when mouse hovers somewhere.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnMouseLeave()

FSDK.Filler.OnMouseLeave ( page  ,
point  ,
flags   
)

(Reserved, unsupported yet) Call this function when mouse leaves somewhere.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnMouseMove()

FSDK.Filler.OnMouseMove ( page  ,
point  ,
flags   
)

Call this function when mouse moves.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnMouseWheel()

FSDK.Filler.OnMouseWheel ( page  ,
point  ,
delta  ,
flags   
)

(Reserved, unsupported yet) Call this function when mouse wheel moves.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]deltaIndicates the amount the mouse wheel has been moved. A positive value means to be moved forward, and a negative value means to be moved backward.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnPaste()

FSDK.Filler.OnPaste ( )

Call this function when the popup menu item "Paste" is down.

Returns
true means success, while false means failure.

◆ OnRButtonDoubleClick()

FSDK.Filler.OnRButtonDoubleClick ( page  ,
point  ,
flags   
)

(Reserved, unsupported yet) Call this function when right mouse button is double clicked.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnRButtonDown()

FSDK.Filler.OnRButtonDown ( page  ,
point  ,
flags   
)

Call this function when right mouse button is down.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnRButtonUp()

FSDK.Filler.OnRButtonUp ( page  ,
point  ,
flags   
)

Call this function when right mouse button is up.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnSelectAll()

FSDK.Filler.OnSelectAll ( )

Call this function when the popup menu item "Select All" is down.

Returns
true means success, while false means failure.

◆ OnWheelButtonDoubleClick()

FSDK.Filler.OnWheelButtonDoubleClick ( page  ,
point  ,
flags   
)

(Reserved, unsupported yet) Call this function when mouse wheel button is double clicked.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnWheelButtonDown()

FSDK.Filler.OnWheelButtonDown ( page  ,
point  ,
flags   
)

(Reserved, unsupported yet) Call this function when mouse wheel button is down.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ OnWheelButtonUp()

FSDK.Filler.OnWheelButtonUp ( page  ,
point  ,
flags   
)

(Reserved, unsupported yet) Call this function when mouse wheel button is up.

Parameters
[in]pageA valid PDF page object.
[in]pointA point where left mouse button is up in the page, in PDF coordinate system.
[in]flagsEvent flags. Please refer to values starting from FSDK.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure. Currently this function does not support to be used yet, so this function will always return false.

◆ Render()

FSDK.Filler.Render ( page  ,
matrix  ,
renderer   
)

Draw the currently focused form control on the page.

If there is no focused form control on the page, nothing will be drawn by this function. The focused form control has to be the topmost visible element, so that it should be always rendered after page content and all the other annotations have been rendered.
For how to render form control (which is associated with widget annotations), please refer to the recommended flow mentioned in comment of class Renderer.

Parameters
[in]pageA valid PDF page object.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function FSDK.PDFPage.GetDisplayMatrix.
[in]rendererA valid renderer object for rendering.
Returns
None.

◆ SetFocus()

FSDK.Filler.SetFocus ( control  )

Set focus on a form control.

Parameters
[in]controlA form control object. If this is constructed by default constructor and not set any value, that means no focus control.
Returns
true means success, while false means failure.

◆ SetHighlightColor()

FSDK.Filler.SetHighlightColor ( color  )

Set the highlight color used for highlighting form fields.

If this function is not called, Foxit PDF SDK will use a kind of light blue grey color (value 0x80C8D2FF) by default.

Parameters
[in]colorThe highlight color to be set for highlighting form fields.
Returns
None.

◆ ShowOverflowIndicator()

FSDK.Filler.ShowOverflowIndicator ( is_show_overflow_indicator  )

Decide whether to show the overflow indicator when the text in text field overflow.

If this function is not called, Foxit PDF SDK will not show form field overflow indicator by default.

Parameters
[in]is_show_overflow_indicatortrue means to show overflow indicator when the text in text field overflow, and false means not to show overflow indicator in this case.
Returns
None.

Member Data Documentation

◆ e_EventFlagShiftKey

FSDK.Filler.e_EventFlagShiftKey
static

Enumeration for key event flags.

Values of this enumeration can be used alone or in combination.

Event flag: "Shift" key.

◆ e_VkeyUnknown

FSDK.Filler.e_VkeyUnknown
static

Enumeration for virtual key code.

Values of this enumeration should be used alone.

An unknown key.