Foxit PDF SDK
FSDK.DocProviderCallback Class Reference

Public Member Functions

 DisplayCaret (page_index, is_visible, rect)
 A callback function used to display or hide caret. More...
 
 ExportData (doc, file_path)
 A callback function used to export data to file. More...
 
 GetCurrentPage (doc) SetCurrentPage(doc
 A callback function used to get index of current page. More...
 
 GetHighlightColor (doc)
 A callback function get the highlight color. More...
 
 GetPopupPos (page_index, min_popup, max_popup, rect_widget, inout_rect_popupconst)
 A callback function used to get the pop-up position. More...
 
 GotoURL (doc, url)
 A callback function used to go to a specified URL. More...
 
 InvalidateRect (page_index, rect, flag)
 A callback function used to invalidate rectangle according the flag. More...
 
 mportData (doc, file_path)
 A callback function used to import data from file. More...
 
 PageViewEvent (page_index, page_view_event_type)
 A callback function to execute page view event. More...
 
 PopupMenu (page_index, rect_popup)
 A callback function used to pop up the context menu. More...
 
 Print (doc, start_page_index, end_page_index, options)
 A callback function used to print. More...
 
 Release ()
 A callback function used to release current callback object itself. More...
 
current_page_index SetChangeMark (doc) GetTitle(doc)
 A callback function used to set change mark flag to current XFA document. More...
 
 SetFocus (xfa_widget)
 A callback function used to set focus widget. More...
 
 SubmitData (doc, target, format, text_encoding, content)
 A callback function to submit data. More...
 
 WidgetEvent (xfa_widget, widget_event_type)
 A callback function to execute XFA widget event. More...
 

Static Public Attributes

static e_InvalidateFlagAllPages
 Enumeration for XFA invalidate flag. More...
 
static e_InvalidateFlagCurrentPage
 Invalidate current page.
 
static e_PageViewEventTypeAdded
 Enumeration for the event type of page view. More...
 
static e_PageViewEventTypeAllRemoved
 Event type: all page views are removed.
 
static e_PageViewEventTypeRemoved
 Event type: after a page view is removed.
 
static e_PrintOptionAsImage
 If set, print page as image; otherwise, as text.
 
static e_PrintOptionCanCancel
 If set, that means printing process can be canceled.
 
static e_PrintOptionPrintAnnot
 If set, print annotations.
 
static e_PrintOptionReverseOrder
 If set, print page in reverse order; otherwise, in normal order.
 
static e_PrintOptionShowDialog
 Enumeration for XFA print options. More...
 
static e_PrintOptionShrinkPage
 If set, shrink page to fit within content area.
 
static e_SubmitInPDF
 The submit data is packaged in PDF format as described in the PDF Reference.
 
static e_SubmitInUrlEncoded
 The submit data is packaged in URL-encoded format as described in Uniform Resource Locator(URL).
 
static e_SubmitInXDP
 Enumeration for XFA submit format. More...
 
static e_SubmitInXFD
 The submit data is packaged in XFD format, as described in XFDF.
 
static e_SubmitInXML
 The submit data is translated and packaged into an URL-Encoded format.
 
static e_TextEncodingBig5
 Text encoding: Big5.
 
static e_TextEncodingFontSpecific
 Text encoding: font specific.
 
static e_TextEncodingGB18030
 Text encoding: GB18030.
 
static e_TextEncodingGB2312
 Text encoding: GB2312.
 
static e_TextEncodingGBK
 Text encoding: GBK.
 
static e_TextEncodingISO8859NN
 Text encoding: ISO8859NN.
 
static e_TextEncodingKSC5601
 Text encoding: KSC5601.
 
static e_TextEncodingNone
 Enumeration for text encoding for XFA submit. More...
 
static e_TextEncodingShiftJIS
 Text encoding: ShiftJIS.
 
static e_TextEncodingUCS2
 Text encoding: UCS-2.
 
static e_TextEncodingUTF16
 Text encoding: UTF-16.
 
static e_TextEncodingUTF8
 Text encoding: UTF-8.
 
static e_WidgetEventTypeAdded
 Enumeration for the type of XFA widget event. More...
 
static e_WidgetEventTypeBeforeRemoved
 Event type: before an XFA widget is removed.
 

Detailed Description

This class represents a callback object as an XFA document provider. All the functions in this class are used as callback functions. Pure virtual functions should be implemented by user.

Member Function Documentation

◆ DisplayCaret()

FSDK.DocProviderCallback.DisplayCaret ( page_index  ,
is_visible  ,
rect   
)

A callback function used to display or hide caret.

Parameters
[in]page_indexThe index of page.
[in]is_visibleUsed to decide whether the caret is visible or not: true means visible, while false means invisible.
[in]rectA rectangle.
Returns
None.

◆ ExportData()

FSDK.DocProviderCallback.ExportData ( doc  ,
file_path   
)

A callback function used to export data to file.

Parameters
[in]docCurrent XFA document.
[in]file_pathA file path, to which the data should be exported. If this is an empty string, user should specify a path as the exported file path. In this case, application can show a dialog to user to let user select the file manually.
Returns
None.

◆ GetCurrentPage()

FSDK.DocProviderCallback.GetCurrentPage (   doc)

A callback function used to get index of current page.

Parameters
[in]docCurrent XFA document.
Returns
The index of current page.

A callback function used to set index of current page.

Parameters
[in]docCurrent XFA document.
[in]current_page_indexThe index would be set.
Returns
None.

◆ GetHighlightColor()

FSDK.DocProviderCallback.GetHighlightColor ( doc  )

A callback function get the highlight color.

Parameters
[in]docCurrent XFA document.
Returns
The highlight color.

◆ GetPopupPos()

FSDK.DocProviderCallback.GetPopupPos ( page_index  ,
min_popup  ,
max_popup  ,
rect_widget  ,
inout_rect_popupconst   
)

A callback function used to get the pop-up position.

Parameters
[in]page_indexThe index of page.
[in]min_popupThe minimum height of drop-down box.
[in]max_popupThe maximum height of drop-down box.
[in]rect_widgetThe rectangle of current widget.
[in,out]inout_rect_popupA rectangle. When this function calls, this is used as an input parameter that specifies the width of drop-down box. When this function returns, this is used as an output parameter that receives the height of drop-down box.
Returns
true means success, while false means failure.

◆ GotoURL()

FSDK.DocProviderCallback.GotoURL ( doc  ,
url   
)

A callback function used to go to a specified URL.

Parameters
[in]docCurrent XFA document.
[in]urlA URL string.
Returns
None.

◆ InvalidateRect()

FSDK.DocProviderCallback.InvalidateRect ( page_index  ,
rect  ,
flag   
)

A callback function used to invalidate rectangle according the flag.

This callback function would be used in dynamic XFA document.

Parameters
[in]page_indexThe index of page.
[in]rectA rectangle to be invalidate.
[in]flagInvalidate flag. Please refer to values starting from FSDK.DocProviderCallback.e_InvalidateFlagAllPages and this would be one of these values.
Returns
None.

◆ mportData()

FSDK.DocProviderCallback.mportData ( doc  ,
file_path   
)

A callback function used to import data from file.

Parameters
[in]docCurrent XFA document.
[in]file_pathA file path, from which the data would be imported. If this is an empty string, user should specify a path as the imported file path. In this case, application can show a dialog to user to let user select the file manually.
Returns
None.

◆ PageViewEvent()

FSDK.DocProviderCallback.PageViewEvent ( page_index  ,
page_view_event_type   
)

A callback function to execute page view event.

Parameters
[in]page_indexThe page index.
[in]page_view_event_typePage view event type. Please refer to values starting from FSDK.DocProviderCallback.e_PageViewEventTypeAdded and this would be one of these values.
Returns
None.

◆ PopupMenu()

FSDK.DocProviderCallback.PopupMenu ( page_index  ,
rect_popup   
)

A callback function used to pop up the context menu.

Parameters
[in]page_indexThe index of page.
[in]rect_popupThe rectangle where to pop up menu.
Returns
true means success, otherwise means failure.

◆ Print()

FSDK.DocProviderCallback.Print ( doc  ,
start_page_index  ,
end_page_index  ,
options   
)

A callback function used to print.

Parameters
[in]docCurrent XFA document.
[in]start_page_indexThe index of start page.
[in]end_page_indexThe index of end page.
[in]optionsPrint options. Please refer to values starting from FSDK.DocProviderCallback.e_PrintOptionShowDialog and this would be one or a combination of these values.
Returns
None.

◆ Release()

FSDK.DocProviderCallback.Release ( )

A callback function used to release current callback object itself.

Returns
None.

◆ SetChangeMark()

current_page_index FSDK.DocProviderCallback.SetChangeMark ( doc  )

A callback function used to set change mark flag to current XFA document.

Parameters
[in]docCurrent XFA document.
Returns
None.

A callback function used to get title of current XFA document.

Parameters
[in]docCurrent XFA document.
Returns
The title.

◆ SetFocus()

FSDK.DocProviderCallback.SetFocus ( xfa_widget  )

A callback function used to set focus widget.

Parameters
[in]xfa_widgetAn XFA widget to be set focus on.
Returns
None.

◆ SubmitData()

FSDK.DocProviderCallback.SubmitData ( doc  ,
target  ,
format  ,
text_encoding  ,
content   
)

A callback function to submit data.

Parameters
[in]docCurrent XFA document.
[in]targetA string that represents the target of data to be submit.
[in]formatThe format of data to be submit. Please refer to values starting from FSDK.DocProviderCallback.e_SubmitInXDP and this would be one of these values.
[in]text_encodingThe text encoding of data to be submit. Please refer to values starting from FSDK.DocProviderCallback.e_TextEncodingNone and this would be one of these values.
[in]contentThe content of data to be submit.
Returns
true means success, otherwise means failure.

◆ WidgetEvent()

FSDK.DocProviderCallback.WidgetEvent ( xfa_widget  ,
widget_event_type   
)

A callback function to execute XFA widget event.

Parameters
[in]xfa_widgetAn XFA widget which sends the event.
[in]widget_event_typeWidget event type. Please refer to values starting from FSDK.DocProviderCallback.e_WidgetEventTypeAdded and this would be one of these values.
Returns
None.

Member Data Documentation

◆ e_InvalidateFlagAllPages

FSDK.DocProviderCallback.e_InvalidateFlagAllPages
static

Enumeration for XFA invalidate flag.

Values of this enumeration should be used alone.

Invalidate all pages.

◆ e_PageViewEventTypeAdded

FSDK.DocProviderCallback.e_PageViewEventTypeAdded
static

Enumeration for the event type of page view.

Values of this enumeration should be used alone.

Event type: after a page view is added.

◆ e_PrintOptionShowDialog

FSDK.DocProviderCallback.e_PrintOptionShowDialog
static

Enumeration for XFA print options.

Values of this enumeration should be used alone.

If set, show printing dialog box.

◆ e_SubmitInXDP

FSDK.DocProviderCallback.e_SubmitInXDP
static

Enumeration for XFA submit format.

Values of this enumeration should be used alone.

The submit data is packaged in XDP format, as described in XDP Specification.

◆ e_TextEncodingNone

FSDK.DocProviderCallback.e_TextEncodingNone
static

Enumeration for text encoding for XFA submit.

Values of this enumeration should be used alone.

No text encoding.

◆ e_WidgetEventTypeAdded

FSDK.DocProviderCallback.e_WidgetEventTypeAdded
static

Enumeration for the type of XFA widget event.

Values of this enumeration should be used alone.

Event type: after an XFA widget is added.