Foxit PDF SDK
|
Public Member Functions | |
boolean | addMenuItem (MenuItemConfig menu_item_config, boolean is_prepend) |
A callback function to adds a menu item to a menu. More... | |
SearchIndexConfig | addSearchIndex (String di_path, boolean is_selected) |
A callback function to add a search index. More... | |
boolean | addSubMenu (MenuItemConfig menu_item_config) |
A callback function to add a menu item with a submenu to the application. More... | |
boolean | addToolButton (ButtonItem button_item) |
A callback function to add a tool button. More... | |
int | alert (String msg, String title, int type, int icon) |
A callback function used to pop up a dialog to show warnings or hints. More... | |
boolean | beep (int type) |
A callback function to cause the system to play a sound. More... | |
String | browseFile () |
A callback function to show a file selection dialog, and the selected file path should be returned. More... | |
String | browseFile (boolean is_open_dialog, String file_format, String file_filter) |
A callback function to show a file selection dialog. More... | |
void | closeDoc (PDFDoc document, boolean is_prompt_to_save) |
A callback function to close document. More... | |
PDFDoc | createBlankDoc () |
A callback function to create a blank PDF document object. More... | |
void | enablePageLoop (boolean is_loop) |
A callback function to set the flag specifies whether the document will loop around to the beginning of the document in response to a page advance (whether generated by mouse click, keyboard, or timer) in full screen mode. More... | |
boolean | executeNamedAction (PDFDoc document, String named_action) |
A callback function to execute a named action. More... | |
String | getAppInfo (int type) |
A callback function to get application information. More... | |
String | getAttachmentsFilePath (PDFDoc pdf_doc, String name) |
A callback function to get the file path of attachments file. More... | |
PDFDoc | getCurrentDoc () |
A callback function to receive current PDF document object. More... | |
int | getCurrentPage (PDFDoc document) |
A callback function used to receive current page index. More... | |
boolean | getDocChangeMark (PDFDoc document) |
A callback function to receive the change mark which indicates whether the content of document is changed or not. More... | |
String | getExtractedEmbeddedFilePath (PDFDoc pdf_doc, String name) |
A callback function to get the file path of extracted embedded file. More... | |
String | getFilePath (PDFDoc document) |
A callback function to get the file path of current PDF document. More... | |
boolean | getFullScreen () |
A callback function to get whether the full screen mode is set. More... | |
IdentityProperties | getIdentityProperties () |
A callback function used to get identity properties of current user. More... | |
int | getLanguage () |
A callback function to get the language of the running viewer application. More... | |
int | getLayoutMode () |
A callback function to get the page layout of the current document. More... | |
MenuListArray | getMenuItemNameList () |
A callback function to get the menu item name list. More... | |
PointF | getMousePosition () |
A callback function to get current mouse position. More... | |
PDFDoc | getOpenedDoc (int index) |
A callback function to receive an opened PDF document object by index. More... | |
int | getOpenedDocCount () |
A callback function to receive the count of opened documents. More... | |
int | getPageRotation (PDFDoc document, int page_index) |
A callback function used to receive current displaying rotation of a page on PDF viewer. More... | |
float | getPageScale () |
A callback function to get current page zoom value. More... | |
RectF | getPageWindowRect () |
A callback function to get the rectangle for the page view window. The page view window is the area inside the inner document window in which the PDF content is displayed. More... | |
int | getPageZoomMode () |
A callback function to get the current page zoom mode. More... | |
WStringArray | getPrinterNameList () |
A callback function to get the printer name list. More... | |
WStringArray | getSignatureAPStyleNameList () |
A callback function to get the name list of signature appearance style. More... | |
String | getTemporaryDirectory () |
A callback function to get temporary directory. More... | |
String | getTemporaryFileName (PDFDoc document, String file_suffix_name) |
A callback function to get the temporary file path. The temporary file name combine the document name with the file suffix name. More... | |
String | getUntitledBookmarkName () |
A callback function to get the new name for an untitled bookmark. More... | |
boolean | invalidateRect (PDFDoc document, int page_index, RectF pdf_rect) |
A callback function to invalidate the client area within the specified rectangle. More... | |
boolean | isCurrentDocOpenedInBrowser () |
A callback function to get the flag specifies whether current document is opened in browser. More... | |
boolean | isLocalFile (PDFDoc document) |
A callback function to check whether the file is local file. More... | |
boolean | isPageLoop () |
A callback function to get the flag specifies whether the document will loop around to the beginning of the document in response to a page advance. More... | |
boolean | launchURL (String url) |
A callback function to launch to a specified URL. More... | |
boolean | mailData (java.lang.Object data, boolean is_ui, String to, String subject, String cc, String bcc, String message) |
A callback function to mail data or message, with or without user interaction. More... | |
int | mailDoc (PDFDoc document, String to_address, String cc_address, String bcc_address, String subject, String message, boolean is_ui) |
A callback function to mails a document as an attachment. More... | |
void | onFieldValueChanged (String field_name, int type, WStringArray value_before_changed, WStringArray value_after_changed) |
A callback function to notify the value change of the field. More... | |
PDFDoc | openDoc (String file_path, String password) |
A callback function to open a PDF file. More... | |
MediaPlayerCallback | openMediaPlayer (PlayerArgs player_args) |
A callback function to open media player. More... | |
String | popupMenu (MenuListArray menus, java.lang.Boolean is_selected_item) |
A callback function to pop up a menu window. More... | |
MenuItemEx | popupMenuEx (MenuItemExArray menus, java.lang.Boolean is_selected_item) |
A callback function to pop up a menu window. More... | |
void | postMessageToHtml (WStringArray message) |
A callback function to send message asynchronously to the message handler for the host container of the PDF document. More... | |
boolean | print (PDFDoc document, boolean is_ui, Range page_range, boolean is_silent, boolean is_shrunk_to_fit, boolean is_printed_as_image, boolean is_reversed, boolean is_to_print_annots) |
A callback function to print pages within a specified index range. More... | |
boolean | print (PDFDoc document, PrintParams print_params) |
A callback function to print document with print parameters. More... | |
void | query (String keywords, int search_scope, SearchOption search_option, String di_path) |
A callback function to query the text keywords. More... | |
void | release () |
A callback function used to release current callback object itself. More... | |
boolean | removeSearchIndex (SearchIndexConfig search_index_config) |
(Reserved, unsupported yet) A callback function to remove a search index. More... | |
boolean | removeToolButtom (String button_name) |
A callback function to remove a tool button added by the function ActionCallback.addToolButton . More... | |
String | response (String question, String title, String default_value, String label, boolean is_password) |
A callback function to display a dialog box containing a question and an entry field for the user to reply to the question. More... | |
void | scroll (PointF point) |
A callback function to scroll the specified point on the current page into the middle of the current view. More... | |
void | selectPageNthWord (int page_index, int start_offset, int end_offset, boolean is_show_selection) |
A callback function to change the current page number and selects the specified word on the page. More... | |
void | setCurrentPage (PDFDoc document, Destination destination) |
A callback function used to set the current page by destination. More... | |
void | setCurrentPage (PDFDoc document, int page_index) |
A callback function used to set the current page by index. More... | |
void | setDefaultPageTransitionMode (String trans_type, String trans_di) |
A callback function to set the default page trastion mode for full screen mode. More... | |
boolean | setDocChangeMark (PDFDoc document, boolean change_mark) |
A callback function to set the change mark which indicates whether the content of document is changed or not. More... | |
void | setFullScreen (boolean is_full_screen) |
A callback function to set full screen mode. More... | |
boolean | setIdentityProperties (IdentityProperties identity_properties) |
A callback function used to set identity properties of current user. More... | |
void | setLayoutMode (int layout_mode, boolean is_cover_mode) |
A callback function to set the page layout of the current document. More... | |
boolean | setPageRotation (PDFDoc document, int page_index, int rotation) |
A callback function used to set the rotation value of a page on PDF viewer. More... | |
void | setPageScale (int zoom_mode, Destination dest) |
A callback function to set current page zoom value. More... | |
boolean | showDialog (DialogDescriptionConfig dlg_config) |
A callback function to show the dialog. More... | |
SOAPResponseInfo | soapRequest (SOAPRequestProperties request_params) |
Initiates a remote procedure call (RPC) or sends an XML message to a SOAP HTTP endpoint. More... | |
boolean | submitForm (PDFDoc document, byte[] form_data, String url, int file_format_type) |
A callback function to submit the form data to a specified URL. More... | |
void | updateLogicalLabel () |
A callback function to update logical label. More... | |
int | verifySignature (PDFDoc document, Signature pdf_signature) |
A callback function to verify specified signature.. More... | |
Static Public Attributes | |
static final int | e_AppInfoTypeAppVersion = 0x04 |
Application's app version information. | |
static final int | e_AppInfoTypeFormsVersion = 0x0 |
Application's forms version information. | |
static final int | e_AppInfoTypeViewerType = 0x01 |
Application's viewer type information. | |
static final int | e_AppInfoTypeViewerVariation = 0x02 |
Application's viewer variation information. | |
static final int | e_AppInfoTypeViewerVersion = 0x03 |
Application's viewer version information. | |
static final int | e_JSFieldValueChangedByCalculation = 1 |
javascript field value changed type : calculation. | |
static final int | e_JSFieldValueChangedByFillColor = 4 |
javascript field value changed type: field fill color. | |
static final int | e_JSFieldValueChangedByFormat = 0 |
javascript field value changed type: format. | |
static final int | e_JSFieldValueChangedBySetReadOnly = 3 |
javascript field value changed type: field set read-only property. | |
static final int | e_JSFieldValueChangedBySetValue = 2 |
javascript field value changed type: field set value. | |
static final int | e_JSMailResultFailed = 0 |
Mailed result: mail failed. | |
static final int | e_JSMailResultSuccess = 1 |
Mailed result: mail success. | |
static final int | e_JSMailResultUserAbort = 2 |
Mailed result: user abort. | |
static final int | e_JSMediaPlayerStateClose = 1 |
media player state: Close. | |
static final int | e_JSMediaPlayerStateOpen = 0 |
media player state: Open. | |
static final int | e_JSMediaPlayerStatePlaying = 2 |
media player state: Playing. | |
static final int | e_JSMediaPlayerStateStop = 3 |
media player state: Stop. | |
static final int | e_JSMediaPlayerStateSuspend = 4 |
media player state: Suspend. | |
static final int | e_LanguageCHS = 1 |
Chinese Simplified. | |
static final int | e_LanguageCHT = 2 |
Chinese Traditional. | |
static final int | e_LanguageDAN = 3 |
Danish. | |
static final int | e_LanguageDEU = 4 |
German. | |
static final int | e_LanguageENU = 5 |
English. | |
static final int | e_LanguageESP = 6 |
Spanish. | |
static final int | e_LanguageFRA = 7 |
French. | |
static final int | e_LanguageITA = 8 |
Italian. | |
static final int | e_LanguageJPN = 10 |
Japanese. | |
static final int | e_LanguageKOR = 9 |
Korean. | |
static final int | e_LanguageNLD = 11 |
Dutch. | |
static final int | e_LanguageNOR = 12 |
Norwegian. | |
static final int | e_LanguagePTB = 13 |
Brazilian Portuguese. | |
static final int | e_LanguageSUO = 14 |
Finnish. | |
static final int | e_LanguageSVE = 15 |
Swedish. | |
static final int | e_LanguageUnknown = 0 |
Unknown language. | |
static final int | e_LayoutModeContinuous = 1 |
Layout mode: continuous page. | |
static final int | e_LayoutModeContinuousFacing = 3 |
Layout mode: continuous two pages. | |
static final int | e_LayoutModeFacing = 2 |
Layout mode: two pages. | |
static final int | e_LayoutModeSinglePage = 0 |
Layout mode: single page. | |
static final int | e_MailTypeDoc = 0 |
Mailed data type: document. | |
static final int | e_MailTypeForm = 1 |
Mailed data type: form. | |
static final int | e_MailTypeMsg = 2 |
Mailed data type: string message. | |
static final int | e_SearchScopeActiveDoc = 0 |
Search scope: active document. | |
static final int | e_SearchScopeActiveIndexes = 3 |
Search scope: active indexes. | |
static final int | e_SearchScopeFolder = 1 |
Search scope: folder. | |
static final int | e_SearchScopeIndex = 2 |
Search scope: index. | |
This class represents a callback object for performing PDF actions. All the pure virtual functions in this class are used as callback functions and should be implemented by user, to perform PDF actions, such as javascript actions.
boolean com.foxit.sdk.ActionCallback.addMenuItem | ( | MenuItemConfig | menu_item_config, |
boolean | is_prepend | ||
) |
A callback function to adds a menu item to a menu.
This callback function will be triggered by the javascript method "app.addMenuItem".
[in] | menu_item_config | The config of the menu item. |
[in] | is_prepend | Determines the position of the new menu item relative to the position specified by MenuItemConfig.getPos or MenuItemConfig.getPos_str . The default value is false. If this parameter is true, the rules for insertion are as follows:
|
SearchIndexConfig com.foxit.sdk.ActionCallback.addSearchIndex | ( | String | di_path, |
boolean | is_selected | ||
) |
A callback function to add a search index.
This callback function will be triggered by the javascript method "search.addIndex". This callback function is optional, so it can be implemented to do nothing.
[in] | di_path | A device-independent path to an index file on the user's hard drive. |
[in] | is_selected | Specifies whether the index should be selected for searching. |
boolean com.foxit.sdk.ActionCallback.addSubMenu | ( | MenuItemConfig | menu_item_config | ) |
A callback function to add a menu item with a submenu to the application.
This callback function will be triggered by the javascript method "app.addSubMenu".
[in] | menu_item_config | The config of the menu item. |
boolean com.foxit.sdk.ActionCallback.addToolButton | ( | ButtonItem | button_item | ) |
A callback function to add a tool button.
This callback function will be triggered by the javascript method "app.addToolButton".
[in] | button_item | The ButtonItem object of the tool button. |
int com.foxit.sdk.ActionCallback.alert | ( | String | msg, |
String | title, | ||
int | type, | ||
int | icon | ||
) |
A callback function used to pop up a dialog to show warnings or hints.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | msg | The message string to be displayed in the dialog. |
[in] | title | The title of the dialog. |
[in] | type | Type of button group. It would be one of following values:
|
[in] | icon | Icon type. It would be one of following values:
|
boolean com.foxit.sdk.ActionCallback.beep | ( | int | type | ) |
A callback function to cause the system to play a sound.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | type | Sound type. The value would be on of following values:
|
String com.foxit.sdk.ActionCallback.browseFile | ( | ) |
A callback function to show a file selection dialog, and the selected file path should be returned.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
String com.foxit.sdk.ActionCallback.browseFile | ( | boolean | is_open_dialog, |
String | file_format, | ||
String | file_filter | ||
) |
A callback function to show a file selection dialog.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | is_open_dialog | A boolean value to specify whether the dialog is for opening file or saving file. true means the dialog should be used to open file, while false means the dialog should be used to save file. |
[in] | file_format | The file format string. |
[in] | file_filter | The file filter string. |
void com.foxit.sdk.ActionCallback.closeDoc | ( | PDFDoc | document, |
boolean | is_prompt_to_save | ||
) |
A callback function to close document.
This callback function will be triggered by the javascript method "Doc.closeDoc". This callback function is optional, so it can be implemented to do nothing.
[in] | document | A PDF document object. It would be valid. |
[in] | is_prompt_to_save | true means show save prompt, while false means not. |
PDFDoc com.foxit.sdk.ActionCallback.createBlankDoc | ( | ) |
A callback function to create a blank PDF document object.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
void com.foxit.sdk.ActionCallback.enablePageLoop | ( | boolean | is_loop | ) |
A callback function to set the flag specifies whether the document will loop around to the beginning of the document in response to a page advance (whether generated by mouse click, keyboard, or timer) in full screen mode.
This callback function will be triggered by the javascript property "app.fs.loop". This callback function is optional, so it can be implemented to do nothing.
[in] | is_loop | true means to loop around to the beginning of the document, while false means not. |
boolean com.foxit.sdk.ActionCallback.executeNamedAction | ( | PDFDoc | document, |
String | named_action | ||
) |
A callback function to execute a named action.
Please refer to description of "Named Actions" in Section 8.5.3 of <PDF Reference 1.7> for more details. This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | named_action | A string to specify a named action. |
String com.foxit.sdk.ActionCallback.getAppInfo | ( | int | type | ) |
A callback function to get application information.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
For the digital information like com.foxit.sdk.ActionCallback.e_AppInfoTypeViewerVersion , com.foxit.sdk.ActionCallback.e_AppInfoTypeAppVersion and com.foxit.sdk.ActionCallback.e_AppInfoTypeFormsVersion , please use string to represent it.
[in] | type | Type of information. Please refer to values starting from com.foxit.sdk.ActionCallback.e_AppInfoTypeFormsVersion and this would be one of these values. |
String com.foxit.sdk.ActionCallback.getAttachmentsFilePath | ( | PDFDoc | pdf_doc, |
String | name | ||
) |
A callback function to get the file path of attachments file.
This callback function will be triggered by the javascript method "Doc.importDataObject". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | pdf_doc | A PDF document object. It will embed with a data object. |
[in] | name | The name to associate with the data object. It's the parameter "cName" of the method "Doc.importDataObject". |
PDFDoc com.foxit.sdk.ActionCallback.getCurrentDoc | ( | ) |
A callback function to receive current PDF document object.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
int com.foxit.sdk.ActionCallback.getCurrentPage | ( | PDFDoc | document | ) |
A callback function used to receive current page index.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
boolean com.foxit.sdk.ActionCallback.getDocChangeMark | ( | PDFDoc | document | ) |
A callback function to receive the change mark which indicates whether the content of document is changed or not.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
String com.foxit.sdk.ActionCallback.getExtractedEmbeddedFilePath | ( | PDFDoc | pdf_doc, |
String | name | ||
) |
A callback function to get the file path of extracted embedded file.
This callback function will be triggered by the javascript method "Doc.exportDataObject". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | pdf_doc | A PDF document object. It will be embedded as a data object to the file . |
[in] | name | The name of the data object to extract. It's the parameter "cName" of the method "Doc.exportDataObject". |
String com.foxit.sdk.ActionCallback.getFilePath | ( | PDFDoc | document | ) |
A callback function to get the file path of current PDF document.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
boolean com.foxit.sdk.ActionCallback.getFullScreen | ( | ) |
A callback function to get whether the full screen mode is set.
This callback function will be triggered by the javascript property "app.fullScreen" or "app.fs.isFullScreen".
IdentityProperties com.foxit.sdk.ActionCallback.getIdentityProperties | ( | ) |
A callback function used to get identity properties of current user.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
int com.foxit.sdk.ActionCallback.getLanguage | ( | ) |
A callback function to get the language of the running viewer application.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
int com.foxit.sdk.ActionCallback.getLayoutMode | ( | ) |
A callback function to get the page layout of the current document.
This callback function will be triggered by the javascript properties "Doc.layout". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
MenuListArray com.foxit.sdk.ActionCallback.getMenuItemNameList | ( | ) |
A callback function to get the menu item name list.
This callback function will be triggered by the javascript method "app.listMenuItems".
PointF com.foxit.sdk.ActionCallback.getMousePosition | ( | ) |
A callback function to get current mouse position.
This callback function will be triggered by the javascript properties "doc.mouseX" or "doc.mouseY". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
PDFDoc com.foxit.sdk.ActionCallback.getOpenedDoc | ( | int | index | ) |
A callback function to receive an opened PDF document object by index.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | index | The index of an opened PDF documents. Valid range: from 0 to count-1. count is returned by callback function ActionCallback.getOpenedDocCount ; |
int com.foxit.sdk.ActionCallback.getOpenedDocCount | ( | ) |
A callback function to receive the count of opened documents.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
int com.foxit.sdk.ActionCallback.getPageRotation | ( | PDFDoc | document, |
int | page_index | ||
) |
A callback function used to receive current displaying rotation of a page on PDF viewer.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | page_index | A page index, used to specify which page's rotation is to be retrieved. The index would start from 0 and less than page count of the specified document. |
float com.foxit.sdk.ActionCallback.getPageScale | ( | ) |
A callback function to get current page zoom value.
This callback function will be triggered by the javascript properties "Doc.zoom". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
RectF com.foxit.sdk.ActionCallback.getPageWindowRect | ( | ) |
A callback function to get the rectangle for the page view window. The page view window is the area inside the inner document window in which the PDF content is displayed.
This callback function will be triggered by the javascript property "Doc.pageWindowRect". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
int com.foxit.sdk.ActionCallback.getPageZoomMode | ( | ) |
A callback function to get the current page zoom mode.
This callback function will be triggered by the javascript properties "Doc.zoom" or "Doc.zoomType". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
WStringArray com.foxit.sdk.ActionCallback.getPrinterNameList | ( | ) |
A callback function to get the printer name list.
This callback function will be triggered by the javascript property "app.printerNames". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
WStringArray com.foxit.sdk.ActionCallback.getSignatureAPStyleNameList | ( | ) |
A callback function to get the name list of signature appearance style.
This callback function will be triggered by the javascript method "SecurityHandler.appearances". This callback function is optional, so it can be implemented to do nothing.
String com.foxit.sdk.ActionCallback.getTemporaryDirectory | ( | ) |
A callback function to get temporary directory.
This callback function will be triggered by the javascript method "Doc.extractpages". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
String com.foxit.sdk.ActionCallback.getTemporaryFileName | ( | PDFDoc | document, |
String | file_suffix_name | ||
) |
A callback function to get the temporary file path. The temporary file name combine the document name with the file suffix name.
This callback function will be triggered by the javascript method "Doc.mailForm". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | file_suffix_name | File suffix name. |
String com.foxit.sdk.ActionCallback.getUntitledBookmarkName | ( | ) |
A callback function to get the new name for an untitled bookmark.
This callback function will be triggered by the javascript mothod "bookmark.createChild" when the parameter "cName" of the method is an empty string. This callback function is optional, so it can be implemented to do nothing and just return a useless value.
boolean com.foxit.sdk.ActionCallback.invalidateRect | ( | PDFDoc | document, |
int | page_index, | ||
RectF | pdf_rect | ||
) |
A callback function to invalidate the client area within the specified rectangle.
All positions are measured in PDF "user space". Implementation should call function common.Renderer.startRender for repainting a specified page area.
[in] | document | A PDF document object. It would be valid. |
[in] | page_index | A page index. It would start from 0 and less than page count of the specified document. |
[in] | pdf_rect | A rectangle that specifies the page area in PDF coordinate system. If this is an empty rectangle, that means to refresh the whole page. |
boolean com.foxit.sdk.ActionCallback.isCurrentDocOpenedInBrowser | ( | ) |
A callback function to get the flag specifies whether current document is opened in browser.
This callback function will be triggered by the javascript property "doc.hostContainer". This callback function is optional, so it can be implemented to do nothing.
boolean com.foxit.sdk.ActionCallback.isLocalFile | ( | PDFDoc | document | ) |
A callback function to check whether the file is local file.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
boolean com.foxit.sdk.ActionCallback.isPageLoop | ( | ) |
A callback function to get the flag specifies whether the document will loop around to the beginning of the document in response to a page advance.
This callback function will be triggered by the javascript property "app.fs.loop". This callback function is optional, so it can be implemented to do nothing.
boolean com.foxit.sdk.ActionCallback.launchURL | ( | String | url | ) |
A callback function to launch to a specified URL.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | url | A URL. |
boolean com.foxit.sdk.ActionCallback.mailData | ( | java.lang.Object | data, |
boolean | is_ui, | ||
String | to, | ||
String | subject, | ||
String | cc, | ||
String | bcc, | ||
String | message | ||
) |
A callback function to mail data or message, with or without user interaction.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | data | A data which is to be mailed. The value and type of the data depends on parameter data_type:
|
[in] | is_ui | true means that the remaining parameters are used to seed the compose-new-message window which is displayed to the user. false means that the parameter to is required and all other parameters are optional. |
[in] | to | A string that specifies a semicolon-delimited list of recipients for the message. |
[in] | subject | A string that specifies the subject of the message. The limit of this string's length is 64 KB. |
[in] | cc | A string that specifies a semicolon-delimited list of CC recipients for the message. |
[in] | bcc | A string that specifies a semicolon-delimited list of BCC recipients for the message. |
[in] | message | A string that specifies the content of the message. The limit of this string's length is 64 KB. |
int com.foxit.sdk.ActionCallback.mailDoc | ( | PDFDoc | document, |
String | to_address, | ||
String | cc_address, | ||
String | bcc_address, | ||
String | subject, | ||
String | message, | ||
boolean | is_ui | ||
) |
A callback function to mails a document as an attachment.
This callback function will be triggered by the javascript method "Doc.mailDoc". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | to_address | To address. |
[in] | cc_address | Cc address. |
[in] | bcc_address | Bcc address. |
[in] | subject | Mail subject. |
[in] | message | Mail message. |
[in] | is_ui | true means to show mail dialog, while false means not. |
void com.foxit.sdk.ActionCallback.onFieldValueChanged | ( | String | field_name, |
int | type, | ||
WStringArray | value_before_changed, | ||
WStringArray | value_after_changed | ||
) |
A callback function to notify the value change of the field.
This callback function will be triggered when the field's value is changed via JavaScript.
[in] | field_name | A string that specifies the field name. |
[in] | type | Field value change type. Please refer to values starting from com.foxit.sdk.ActionCallback.e_JSFieldValueChangedByFormat and this would be one of these values. |
[in] | value_before_changed | A string array that specifies the field's value before the change. For a list box, the parameter represent one or more than one of the field's items which be selected simultaneously. |
[in] | value_after_changed | A string array that specifies the field's value after the change. For a list box, the parameter represent one or more than one of the field's items which be selected simultaneously. |
PDFDoc com.foxit.sdk.ActionCallback.openDoc | ( | String | file_path, |
String | password | ||
) |
A callback function to open a PDF file.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | file_path | A full path of an existing PDF file. |
[in] | password | Password for input PDF file. This may be an empty string. |
MediaPlayerCallback com.foxit.sdk.ActionCallback.openMediaPlayer | ( | PlayerArgs | player_args | ) |
A callback function to open media player.
This callback function will be triggered by the javascript method "app.media.openPlayer" or "app.media.createPlayer".
[in] | player_args | The PlayerArgs object. |
String com.foxit.sdk.ActionCallback.popupMenu | ( | MenuListArray | menus, |
java.lang.Boolean | is_selected_item | ||
) |
A callback function to pop up a menu window.
The position of menu window is the same as cursor's. This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | menus | An array of menu list objects. |
[out] | is_selected_item | Output parameter that receives the value of whether a menu item is selected or not. true means that the menu item is selected, while false means that the menu item is not selected. |
MenuItemEx com.foxit.sdk.ActionCallback.popupMenuEx | ( | MenuItemExArray | menus, |
java.lang.Boolean | is_selected_item | ||
) |
A callback function to pop up a menu window.
The position of menu window is the same as cursor's. This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | menus | An array of MenuItemEx objects. |
[out] | is_selected_item | Output parameter that receives the value of whether a menu item is selected or not. true means that the menu item is selected, while false means that the menu item is not selected. |
void com.foxit.sdk.ActionCallback.postMessageToHtml | ( | WStringArray | message | ) |
A callback function to send message asynchronously to the message handler for the host container of the PDF document.
For this message to be delivered, the host container (for example, an <OBJECT> element in an HTML page) must have registered for notification by setting its messageHandler property.
This callback function will be triggered by the javascript method "doc.hostContainer.postMessage". This callback function is optional, so it can be implemented to do nothing.
[in] | message | An array of string that specifies the message to be posted. |
boolean com.foxit.sdk.ActionCallback.print | ( | PDFDoc | document, |
boolean | is_ui, | ||
Range | page_range, | ||
boolean | is_silent, | ||
boolean | is_shrunk_to_fit, | ||
boolean | is_printed_as_image, | ||
boolean | is_reversed, | ||
boolean | is_to_print_annots | ||
) |
A callback function to print pages within a specified index range.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | is_ui | true means that a UI should be presented to the user to obtain printing information and confirm the action. |
[in] | page_range | A range object to specify the page range for printing. All the indexes represented in this range would start from 0 and less than page count of the specified document. |
[in] | is_silent | true means that the cancel dialog box should be suppressed while the document is printing. |
[in] | is_shrunk_to_fit | true means that the page should be shrunk (if necessary) to fit within the area of the printed page. |
[in] | is_printed_as_image | true means that pages should be printed as image. |
[in] | is_reversed | true means that the printing order should be from parameter end to parameter start. |
[in] | is_to_print_annots | true means that annotations should be printed with page. |
boolean com.foxit.sdk.ActionCallback.print | ( | PDFDoc | document, |
PrintParams | print_params | ||
) |
A callback function to print document with print parameters.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | print_params | A PrintParams object. |
void com.foxit.sdk.ActionCallback.query | ( | String | keywords, |
int | search_scope, | ||
SearchOption | search_option, | ||
String | di_path | ||
) |
A callback function to query the text keywords.
This callback function will be triggered by the javascript method "search.query". This callback function is optional, so it can be implemented to do nothing.
[in] | keywords | The text content for which to search. |
[in] | search_scope | Specifies where the text should be searched. Please refer to values starting from com.foxit.sdk.ActionCallback.e_SearchScopeActiveDoc and this should be one of these values. |
[in] | search_option | A SearchOption object that represents search option. |
[in] | di_path | A device-independent path to a folder or search index on the user's computer. This parameter is optional. When search_scope is com.foxit.sdk.ActionCallback.e_SearchScopeFolder or com.foxit.sdk.ActionCallback.e_SearchScopeIndex , this parameter is required. |
void com.foxit.sdk.ActionCallback.release | ( | ) |
A callback function used to release current callback object itself.
boolean com.foxit.sdk.ActionCallback.removeSearchIndex | ( | SearchIndexConfig | search_index_config | ) |
(Reserved, unsupported yet) A callback function to remove a search index.
This callback function will be triggered by the javascript method "search.removeIndex". This callback function is optional, so it can be implemented to do nothing.
[in] | search_index_config | A SearchIndexConfig that represents the search index config. |
boolean com.foxit.sdk.ActionCallback.removeToolButtom | ( | String | button_name | ) |
A callback function to remove a tool button added by the function ActionCallback.addToolButton .
This callback function will be triggered by the javascript method "app.removeToolButton".
[in] | button_name | The name of the tool button. |
String com.foxit.sdk.ActionCallback.response | ( | String | question, |
String | title, | ||
String | default_value, | ||
String | label, | ||
boolean | is_password | ||
) |
A callback function to display a dialog box containing a question and an entry field for the user to reply to the question.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | question | A string that specifies the question to be posed to the user. |
[in] | title | A string that specifies the title of the dialog box. |
[in] | default_value | A string that specifies a default value as the answer to the question. If the answer is not specified, no default value is presented. |
[in] | label | A string that specifies a short string to appear in front of the edit text field. |
[in] | is_password | A boolean value that indicates whether user's response should be masked to show: true means that the user's response should show as asterisks (*) or bullets (?) to mask the response, which might be sensitive information. |
void com.foxit.sdk.ActionCallback.scroll | ( | PointF | point | ) |
A callback function to scroll the specified point on the current page into the middle of the current view.
This callback function will be triggered by the javascript method "Doc.scroll". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | point | The specified point[PDF coordinate system]. |
void com.foxit.sdk.ActionCallback.selectPageNthWord | ( | int | page_index, |
int | start_offset, | ||
int | end_offset, | ||
boolean | is_show_selection | ||
) |
A callback function to change the current page number and selects the specified word on the page.
This callback function will be triggered by the javascript method "Doc.selectPageNthWord". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | page_index | The page index. |
[in] | start_offset | The start word offset. |
[in] | end_offset | The end word offset. |
[in] | is_show_selection | true means to show selection, while false means not. |
void com.foxit.sdk.ActionCallback.setCurrentPage | ( | PDFDoc | document, |
Destination | destination | ||
) |
A callback function used to set the current page by destination.
This callback function is optional, so it can be implemented to do nothing.
[in] | document | A PDF document object. It would be valid. |
[in] | destination | A |
void com.foxit.sdk.ActionCallback.setCurrentPage | ( | PDFDoc | document, |
int | page_index | ||
) |
A callback function used to set the current page by index.
This callback function is optional, so it can be implemented to do nothing.
[in] | document | A PDF document object. It would be valid. |
[in] | page_index | A page index which is used to change current page. The index would start from 0 and less than page count of the specified document. |
void com.foxit.sdk.ActionCallback.setDefaultPageTransitionMode | ( | String | trans_type, |
String | trans_di | ||
) |
A callback function to set the default page trastion mode for full screen mode.
This callback function will be triggered by the javascript property "app.fs.defaultTransition". This callback function is optional, so it can be implemented to do nothing.
[in] | trans_type | A string that specifies the type of the transition effect. Please refer to the follow values: "Split", "Box", "Fly", "Blinds", "Push", "Wipe", "Glitter", "Cover", "Uncover", "Dissolve", "Replace", "Fade". |
[in] | trans_di | A string that specifies the direction of the transition effect.
|
boolean com.foxit.sdk.ActionCallback.setDocChangeMark | ( | PDFDoc | document, |
boolean | change_mark | ||
) |
A callback function to set the change mark which indicates whether the content of document is changed or not.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | change_mark | A boolean value that indicates whether the content of document is changed or not. |
void com.foxit.sdk.ActionCallback.setFullScreen | ( | boolean | is_full_screen | ) |
A callback function to set full screen mode.
This callback function will be triggered when the javascript property "app.fullScreen" or "app.fs.isFullScreen" is to be set.
[in] | is_full_screen | true means to set full screen mode, while false means not. |
boolean com.foxit.sdk.ActionCallback.setIdentityProperties | ( | IdentityProperties | identity_properties | ) |
A callback function used to set identity properties of current user.
This callback function is optional, so it can be implemented to do nothing.
[in] | identity_properties | An identity properties object used to be set. |
void com.foxit.sdk.ActionCallback.setLayoutMode | ( | int | layout_mode, |
boolean | is_cover_mode | ||
) |
A callback function to set the page layout of the current document.
This callback function will be triggered by the javascript properties "Doc.layout". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | layout_mode | The layout mode. Please refer to values starting from com.foxit.sdk.ActionCallback.e_LayoutModeSinglePage and this should be one of these values. |
[in] | is_cover_mode | true means that the cover will always displayed separately, while false means not. |
boolean com.foxit.sdk.ActionCallback.setPageRotation | ( | PDFDoc | document, |
int | page_index, | ||
int | rotation | ||
) |
A callback function used to set the rotation value of a page on PDF viewer.
This callback function is optional, so it can be implemented to do nothing.
[in] | document | A PDF document object. It would be valid. |
[in] | page_index | A page index, used to specify which page's rotation is to be changed. The index would start from 0 and less than page count of the specified document. |
[in] | rotation | New rotation value. Please refer to values starting from com.foxit.sdk.common.Constants.e_Rotation0 and this should be one of these values except com.foxit.sdk.common.Constants.e_RotationUnknown . |
void com.foxit.sdk.ActionCallback.setPageScale | ( | int | zoom_mode, |
Destination | dest | ||
) |
A callback function to set current page zoom value.
This callback function will be triggered by the javascript properties "Doc.zoom" or "Doc.zoomType". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | zoom_mode | The zoom mode. Please refer to values starting from com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ and this should be one of these values. |
[in] | dest | A com.foxit.sdk.pdf.actions.Destination object that represents destination data. |
boolean com.foxit.sdk.ActionCallback.showDialog | ( | DialogDescriptionConfig | dlg_config | ) |
A callback function to show the dialog.
This callback function will be triggered by the javascript method "app.execDialog".
[in] | dlg_config | The DialogDescriptionConfig object. |
SOAPResponseInfo com.foxit.sdk.ActionCallback.soapRequest | ( | SOAPRequestProperties | request_params | ) |
Initiates a remote procedure call (RPC) or sends an XML message to a SOAP HTTP endpoint.
The method either waits for the endpoint to reply (synchronous processing) or calls a method on the notification object (asynchronous processing).
This callback function will be triggered by the javascript method "SOAP.request". This callback function is optional, so it can be implemented to do nothing.
[in] | request_params | A SOAPRequestProperties object that contains the property parameters for the SOAP request. |
boolean com.foxit.sdk.ActionCallback.submitForm | ( | PDFDoc | document, |
byte[] | form_data, | ||
String | url, | ||
int | file_format_type | ||
) |
A callback function to submit the form data to a specified URL.
This callback function is optional, so it can be implemented to do nothing and just return a useless value.
[in] | document | A PDF document object. It would be valid. |
[in] | form_data | A form data buffer which is to be submitted. |
[in] | url | A URL, to which the form data will be submitted. |
[in] | file_format_type | File format type for submission form. Please refer to values starting from com.foxit.sdk.common.Constants.e_FileFormatTypeFDF and this would be one of these values. |
void com.foxit.sdk.ActionCallback.updateLogicalLabel | ( | ) |
A callback function to update logical label.
This callback function will be triggered by the javascript method "Doc.setPageLabels". This callback function is optional, so it can be implemented to do nothing and just return a useless value.
A callback function to verify specified signature..
This callback function will be triggered when a signature is to be verified by an action. If user does not want to verify the signature, just implement this function to do nothing and just return com.foxit.sdk.pdf.Signature.e_StateUnknown . User is recommended to use class com.foxit.sdk.pdf.LTVVerifier to verify if a signed signature is valid or not.
[in] | document | A PDF document object. It would be valid. |
[in] | pdf_signature | A PDF signature which is signed. This signature belongs to input parameter document. |