Foxit PDF SDK
FSFiller Class Reference
Inheritance diagram for FSFiller:
FSBase

Instance Methods

(void) - highlightFormFields:
 Decide whether to highlight form fields or not.
More...
 
(id) - initWithForm:assist:
 Constructor.
More...
 
(id) - initWithOther:
 Constructor, with another filler object.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(BOOL) - killFocus
 Kill focus from form.
More...
 
(BOOL) - onChar:flags:
 Call this function when a character code is about to be inputted to a form field.
More...
 
(BOOL) - onKeyDown:flags:
 (Reserved, unsupported yet) Call this function when key on the keyboard is down.
More...
 
(BOOL) - onKeyUp:flags:
 (Reserved, unsupported yet) Call this function when key on the keyboard is up.
More...
 
(BOOL) - onLButtonDoubleClick:point:flags:
 Call this function when left mouse button is double clicked.
More...
 
(BOOL) - onLButtonDown:point:flags:
 Call this function when left mouse button is down.
More...
 
(BOOL) - onLButtonUp:point:flags:
 Call this function when left mouse button is up.
More...
 
(BOOL) - onMouseEnter:point:flags:
 (Reserved, unsupported yet) Call this function when mouse enters somewhere.
More...
 
(BOOL) - onMouseHover:point:flags:
 (Reserved, unsupported yet) Call this function when mouse hovers somewhere.
More...
 
(BOOL) - onMouseLeave:point:flags:
 (Reserved, unsupported yet) Call this function when mouse leaves somewhere.
More...
 
(BOOL) - onMouseMove:point:flags:
 Call this function when mouse moves.
More...
 
(BOOL) - onMouseWheel:point:delta:flags:
 (Reserved, unsupported yet) Call this function when mouse wheel moves.
More...
 
(BOOL) - onRButtonDoubleClick:point:flags:
 (Reserved, unsupported yet) Call this function when right mouse button is double clicked.
More...
 
(BOOL) - onRButtonDown:point:flags:
 (Reserved, unsupported yet) Call this function when right mouse button is down.
More...
 
(BOOL) - onRButtonUp:point:flags:
 (Reserved, unsupported yet) Call this function when right mouse button is up.
More...
 
(BOOL) - onWheelButtonDoubleClick:point:flags:
 (Reserved, unsupported yet) Call this function when mouse wheel button is double clicked.
More...
 
(BOOL) - onWheelButtonDown:point:flags:
 (Reserved, unsupported yet) Call this function when right mouse wheel button is down.
More...
 
(BOOL) - onWheelButtonUp:point:flags:
 (Reserved, unsupported yet) Call this function when right mouse wheel button is up.
More...
 
(void) - render:matrix:renderer:
 Draw the currently focused form control on the page.
More...
 
(BOOL) - setFocus:
 Set focus on a form control.
More...
 
(void) - setHighlightColor:
 Set the highlight color used for highlighting form fields.
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 FSForm object more than one time. User is recommended to implement an FSActionCallback and set it to Foxit PDF SDK by function FSLibrary::setActionCallback:, in order to implement more features of form filler.

See also
FSLibrary

Method Documentation

◆ highlightFormFields:()

- (void) highlightFormFields: (BOOL)  is_highlight

Decide whether to highlight 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.

Parameters
[in]is_highlightYES means to highlight form fields, and NO means not to highlight form fields.
Returns
None.

◆ initWithForm:assist:()

- (id) initWithForm: (FSForm*)  form
assist: (id<FSFillerAssistCallback>)  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 nil.

◆ initWithOther:()

- (id) initWithOther: (FSFiller*)  other

Constructor, with another filler object.

Parameters
[in]otherAnother filler object.

◆ isEmpty()

- (BOOL) isEmpty

Check whether current object is empty or not.

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

Returns
YES means current object is empty, while NO means not.

◆ killFocus()

- (BOOL) killFocus

Kill focus from form.

Returns
YES means success, while NO means failure.

◆ onChar:flags:()

- (BOOL) onChar: (unsigned int)  char_code
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure.

◆ onKeyDown:flags:()

- (BOOL) onKeyDown: (unsigned int)  key_code
flags: (unsigned int)  flags 

(Reserved, unsupported yet) Call this function when key on the keyboard is down.

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

◆ onKeyUp:flags:()

- (BOOL) onKeyUp: (unsigned int)  key_code
flags: (unsigned int)  flags 

(Reserved, unsupported yet) Call this function when key on the keyboard is up.

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

◆ onLButtonDoubleClick:point:flags:()

- (BOOL) onLButtonDoubleClick: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure.

◆ onLButtonDown:point:flags:()

- (BOOL) onLButtonDown: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure.

◆ onLButtonUp:point:flags:()

- (BOOL) onLButtonUp: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure.

◆ onMouseEnter:point:flags:()

- (BOOL) onMouseEnter: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onMouseHover:point:flags:()

- (BOOL) onMouseHover: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onMouseLeave:point:flags:()

- (BOOL) onMouseLeave: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onMouseMove:point:flags:()

- (BOOL) onMouseMove: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure.

◆ onMouseWheel:point:delta:flags:()

- (BOOL) onMouseWheel: (FSPDFPage*)  page
point: (FSPointF*)  point
delta: (int)  delta
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onRButtonDoubleClick:point:flags:()

- (BOOL) onRButtonDoubleClick: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onRButtonDown:point:flags:()

- (BOOL) onRButtonDown: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  flags 

(Reserved, unsupported yet) 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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onRButtonUp:point:flags:()

- (BOOL) onRButtonUp: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  flags 

(Reserved, unsupported yet) 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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onWheelButtonDoubleClick:point:flags:()

- (BOOL) onWheelButtonDoubleClick: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onWheelButtonDown:point:flags:()

- (BOOL) onWheelButtonDown: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  flags 

(Reserved, unsupported yet) Call this function when right 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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ onWheelButtonUp:point:flags:()

- (BOOL) onWheelButtonUp: (FSPDFPage*)  page
point: (FSPointF*)  point
flags: (unsigned int)  flags 

(Reserved, unsupported yet) Call this function when right 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 FSFillerEventFlagShiftKey and this should be one or a combination of these values.
Returns
YES means success, while NO means failure. Currently this function does not support to be used yet, so this function will always return NO.

◆ render:matrix:renderer:()

- (void) render: (FSPDFPage*)  page
matrix: (FSMatrix2D*)  matrix
renderer: (FSRenderer*)  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 FSPDFPage::getDisplayMatrix:top:width:height:rotate:.
[in]rendererA valid renderer object for rendering.
Returns
None.

◆ setFocus:()

- (BOOL) setFocus: (FSControl*)  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
YES means success, while NO means failure.

◆ setHighlightColor:()

- (void) setHighlightColor: (unsigned int)  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.