Foxit PDF SDK
fsdk.Filler Class Reference

Public Member Functions

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

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 Form object more than one time. User is recommended to implement an fsdk.ActionCallback and set it to Foxit PDF SDK by function fsdk.LibrarySetActionCallback , in order to implement more features of form filler.

See also
fsdk.Library

Member Function Documentation

◆ GetEditingTextCaretPosition()

def 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()

def fsdk.Filler.HighlightFormFields (   is_highlight)

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

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 (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.

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()

def 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()

def fsdk.Filler.KillFocus ( )

Kill focus from form.

Returns
true means success, while false means failure.

◆ OnChar()

def fsdk.Filler.OnChar (   char_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.FillerE_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnCopy()

def fsdk.Filler.OnCopy ( )

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

Returns
true means success, while false means failure.

◆ OnCut()

def fsdk.Filler.OnCut ( )

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

Returns
true means success, while false means failure.

◆ OnDelete()

def fsdk.Filler.OnDelete ( )

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

Returns
true means success, while false means failure.

◆ OnKeyDown()

def 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.FillerE_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from fsdk.FillerE_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()

def 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.FillerE_VkeyUnknown and this should be one of these values.
[in]flagsEvent flags. Please refer to values starting from fsdk.FillerE_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()

def 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.FillerE_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonDown()

def 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.FillerE_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnLButtonUp()

def 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.FillerE_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnMouseEnter()

def 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.FillerE_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()

def 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.FillerE_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()

def 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.FillerE_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()

def 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.FillerE_EventFlagShiftKey and this should be one or a combination of these values.
Returns
true means success, while false means failure.

◆ OnMouseWheel()

def 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.FillerE_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()

def fsdk.Filler.OnPaste ( )

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

Returns
true means success, while false means failure.

◆ OnRButtonDoubleClick()

def 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.FillerE_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()

def 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.FillerE_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()

def 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.FillerE_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()

def fsdk.Filler.OnSelectAll ( )

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

Returns
true means success, while false means failure.

◆ OnWheelButtonDoubleClick()

def 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.FillerE_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()

def 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.FillerE_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()

def 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.FillerE_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()

def 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()

def 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()

def 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()

def 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.