Foxit PDF SDK
|
Public Member Functions | |
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... | |
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... | |
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 | getFilePath (PDFDoc document) |
A callback function to get the file path of current PDF document. 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... | |
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... | |
boolean | invalidateRect (PDFDoc document, int page_index, RectF pdf_rect) |
A callback function to invalidate the client area within the specified rectangle. 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... | |
String | popupMenu (MenuListArray menus) |
A callback function to pop up a menu window. 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... | |
void | release () |
A callback function used to release current callback object itself. 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 | setCurrentPage (PDFDoc document, int page_index) |
A callback function used to set the current page by index. 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... | |
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... | |
boolean | submitForm (PDFDoc document, byte[] form_data, String url) |
A callback function to submit the form data to a specified url. 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_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_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. | |
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.
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.
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. |
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.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. |
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.
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. countt 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. |
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. |
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. |
String com.foxit.sdk.ActionCallback.popupMenu | ( | MenuListArray | menus | ) |
A callback function to pop up a menu window.
The position of menu window is 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. |
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. |
void com.foxit.sdk.ActionCallback.release | ( | ) |
A callback function used to release current callback object itself.
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. Default: false. |
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. |
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. |
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 . |
boolean com.foxit.sdk.ActionCallback.submitForm | ( | PDFDoc | document, |
byte [] | form_data, | ||
String | url | ||
) |
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 submit. |
[in] | url | A url, to which the form data will be submit. |