Foxit PDF SDK
|
Public Member Functions | |
DocViewerPrefs (DocViewerPrefs other) | |
Constructor, with another document viewer preferences object. More... | |
DocViewerPrefs (PDFDoc document, PDFDictionary pdf_dict) throws com.foxit.sdk.PDFException | |
Constructor, with parameters. More... | |
synchronized void | delete () |
Clean up related resources immediately. More... | |
PDFDictionary | getDict () throws com.foxit.sdk.PDFException |
Get PDF dictionary from current object. More... | |
int | getNonFullScreenPageMode () throws com.foxit.sdk.PDFException |
Get display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen. More... | |
int | getPrintArea () throws com.foxit.sdk.PDFException |
Get the page boundary representing the area of a page to be rendered when printing the document. More... | |
int | getPrintClip () throws com.foxit.sdk.PDFException |
Get the page boundary to which the contents of a page are to be clipped when printing the document. More... | |
int | getPrintCopies () throws com.foxit.sdk.PDFException |
Get the number of copies to be printed when the print dialog is opened for PDF document. More... | |
Range | getPrintRange () throws com.foxit.sdk.PDFException |
Get page range information which is used to initialize the print dialog when the print dialog is opened for the PDF document. More... | |
int | getPrintScale () throws com.foxit.sdk.PDFException |
Get page scaling option to be selected when a print dialog is displayed for PDF document. More... | |
boolean | getReadingDirection () throws com.foxit.sdk.PDFException |
Get the predominant reading direction for text. More... | |
boolean | getUIDisplayStatus (int pref) throws com.foxit.sdk.PDFException |
Get UI display status of a specified viewer preference item type. More... | |
int | getViewArea () throws com.foxit.sdk.PDFException |
Get the page boundary representing the area of a page to be displayed when viewing the document on the screen. More... | |
int | getViewClip () throws com.foxit.sdk.PDFException |
Get the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
void | setNonFullScreenPageMode (int display_mode) throws com.foxit.sdk.PDFException |
Set display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen. More... | |
void | setPrintArea (int box_type) throws com.foxit.sdk.PDFException |
Set the page boundary representing the area of a page to be rendered when printing the document. More... | |
void | setPrintClip (int box_type) throws com.foxit.sdk.PDFException |
Set the page boundary to which the contents of a page are to be clipped when printing the document. More... | |
void | setPrintCopies (int print_copies) throws com.foxit.sdk.PDFException |
Set the number of copies to be printed when the print dialog is opened for PDF document. More... | |
void | setPrintRange (Range page_range) throws com.foxit.sdk.PDFException |
Set the page range which is used to initialize the print dialog when the print dialog is opened for the PDF document. More... | |
void | setPrintScale (int print_scale) throws com.foxit.sdk.PDFException |
Set page scaling option to be selected when a print dialog is displayed for PDF document. More... | |
void | setReadingDirection (boolean is_left_to_right) throws com.foxit.sdk.PDFException |
Set the predominant reading direction for text. More... | |
void | setUIDisplayStatus (int pref, boolean value) throws com.foxit.sdk.PDFException |
Set UI display status of a specified viewer preference item type. More... | |
void | setViewArea (int box_type) throws com.foxit.sdk.PDFException |
Set the page boundary representing the area of a page to be displayed when viewing the document on the screen. More... | |
void | setViewClip (int box_type) throws com.foxit.sdk.PDFException |
Set the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. More... | |
Static Public Attributes | |
static final int | e_CenterWindow = 4 |
A flag specifying whether to position the document's window in the center of the screen. | |
static final int | e_DisplayDocTitle = 5 |
A flag specifying whether the window's title bar should display the document title taken from the "Title" entry of the document information dictionary. If false, the title bar should instead display the name of the PDF file containing the document. | |
static final int | e_FitWindow = 3 |
A flag specifying whether to resize the document's window to fit the size of the first displayed page. | |
static final int | e_HideMenubar = 1 |
A flag specifying whether to hide the viewer application's menu bar when the document is active. | |
static final int | e_HideToolbar = 0 |
A flag specifying whether to hide the viewer application's tool bars when the document is active. | |
static final int | e_HideWindowUI = 2 |
A flag specifying whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed. | |
static final int | e_PrintScaleAppDefault = 1 |
This means applications should use the current print scaling. | |
static final int | e_PrintScaleNone = 0 |
This means the print dialog should reflect no page scaling. | |
Viewer preferences defines the way that a document is to be presented on the screen or in print. This class should be constructed by a valid PDF document object. This class offers functions to get/set different part of a PDF document's viewer preferences, such as UI visibility, display mode for non full-screen mode, reading direction, the type of box item for specified purpose, some preference options used for print and so on.
com.foxit.sdk.pdf.DocViewerPrefs.DocViewerPrefs | ( | PDFDoc | document, |
PDFDictionary | pdf_dict | ||
) | throws com.foxit.sdk.PDFException |
Constructor, with parameters.
When input parameter pdf_dict is null, Foxit PDF SDK will try to access viewer preferences information in the specified PDF document: if there exists viewer preferences information in the PDF document, this function is just to construct a document viewer preferences object to be associated with these information; if there is no such information in the specified PDF document, the constructed document viewer preferences object can be used to set these information to PDF document.
[in] | document | A valid PDF document object. |
[in] | pdf_dict | A PDF dictionary which represents PDF document viewer preferences information. If this parameter is not null, this PDF dictionary should have existed in the specified PDF document. If this parameter is null, that means to access access viewer preferences information in the specified PDF document. Please refer to "Details" part for more details. |
com.foxit.sdk.pdf.DocViewerPrefs.DocViewerPrefs | ( | DocViewerPrefs | other | ) |
Constructor, with another document viewer preferences object.
[in] | other | Another document viewer preferences object. |
synchronized void com.foxit.sdk.pdf.DocViewerPrefs.delete | ( | ) |
Clean up related resources immediately.
Reimplemented from com.foxit.sdk.common.Base.
PDFDictionary com.foxit.sdk.pdf.DocViewerPrefs.getDict | ( | ) | throws com.foxit.sdk.PDFException |
Get PDF dictionary from current object.
int com.foxit.sdk.pdf.DocViewerPrefs.getNonFullScreenPageMode | ( | ) | throws com.foxit.sdk.PDFException |
Get display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen.
This display mode is only useful when document's display mode is full-screen. Function PDFDoc.getDisplayMode can be used to check document's displaying mode.
int com.foxit.sdk.pdf.DocViewerPrefs.getPrintArea | ( | ) | throws com.foxit.sdk.PDFException |
Get the page boundary representing the area of a page to be rendered when printing the document.
int com.foxit.sdk.pdf.DocViewerPrefs.getPrintClip | ( | ) | throws com.foxit.sdk.PDFException |
Get the page boundary to which the contents of a page are to be clipped when printing the document.
int com.foxit.sdk.pdf.DocViewerPrefs.getPrintCopies | ( | ) | throws com.foxit.sdk.PDFException |
Get the number of copies to be printed when the print dialog is opened for PDF document.
Range com.foxit.sdk.pdf.DocViewerPrefs.getPrintRange | ( | ) | throws com.foxit.sdk.PDFException |
Get page range information which is used to initialize the print dialog when the print dialog is opened for the PDF document.
All the indexes specified in the page range is from 0 to (pagecount - 1). If page range information is invalid, this function will throw exception com.foxit.sdk.common.Constants.e_ErrFormat .
int com.foxit.sdk.pdf.DocViewerPrefs.getPrintScale | ( | ) | throws com.foxit.sdk.PDFException |
Get page scaling option to be selected when a print dialog is displayed for PDF document.
boolean com.foxit.sdk.pdf.DocViewerPrefs.getReadingDirection | ( | ) | throws com.foxit.sdk.PDFException |
Get the predominant reading direction for text.
The reading direction information has no direct effect on the document's contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up (that is, multiple PDF pages are printed on a single page).
boolean com.foxit.sdk.pdf.DocViewerPrefs.getUIDisplayStatus | ( | int | pref | ) | throws com.foxit.sdk.PDFException |
Get UI display status of a specified viewer preference item type.
[in] | pref | A viewer preference item type. Please refer to values starting from com.foxit.sdk.pdf.DocViewerPrefs.e_HideToolbar and this should be one of these values. |
int com.foxit.sdk.pdf.DocViewerPrefs.getViewArea | ( | ) | throws com.foxit.sdk.PDFException |
Get the page boundary representing the area of a page to be displayed when viewing the document on the screen.
int com.foxit.sdk.pdf.DocViewerPrefs.getViewClip | ( | ) | throws com.foxit.sdk.PDFException |
Get the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
boolean com.foxit.sdk.pdf.DocViewerPrefs.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
void com.foxit.sdk.pdf.DocViewerPrefs.setNonFullScreenPageMode | ( | int | display_mode | ) | throws com.foxit.sdk.PDFException |
Set display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen.
This display mode is only useful when document's display mode is full-screen. Function PDFDoc.getDisplayMode can be used to document's displaying mode.
[in] | display_mode | New display mode when exiting full-screen mode. It should be one of following values:
|
void com.foxit.sdk.pdf.DocViewerPrefs.setPrintArea | ( | int | box_type | ) | throws com.foxit.sdk.PDFException |
Set the page boundary representing the area of a page to be rendered when printing the document.
[in] | box_type | The page box type. Please refer to values starting from com.foxit.sdk.pdf.PDFPage.e_MediaBox and this should be one of these values. |
void com.foxit.sdk.pdf.DocViewerPrefs.setPrintClip | ( | int | box_type | ) | throws com.foxit.sdk.PDFException |
Set the page boundary to which the contents of a page are to be clipped when printing the document.
[in] | box_type | The page box type. Please refer to values starting from com.foxit.sdk.pdf.PDFPage.e_MediaBox and this should be one of these values. |
void com.foxit.sdk.pdf.DocViewerPrefs.setPrintCopies | ( | int | print_copies | ) | throws com.foxit.sdk.PDFException |
Set the number of copies to be printed when the print dialog is opened for PDF document.
[in] | print_copies | New integer value for number of copies. Valid range: from 1 to 5. If input value is outside the valid range, Foxit PDF SDK will use 1 by default. |
void com.foxit.sdk.pdf.DocViewerPrefs.setPrintRange | ( | Range | page_range | ) | throws com.foxit.sdk.PDFException |
Set the page range which is used to initialize the print dialog when the print dialog is opened for the PDF document.
[in] | page_range | A range object that represents the new page range information. It should contain at least one valid range segment. All the indexes specified by this range should be from 0 to (pagecount - 1). pagecount is returned by function PDFDoc.getPageCount . |
void com.foxit.sdk.pdf.DocViewerPrefs.setPrintScale | ( | int | print_scale | ) | throws com.foxit.sdk.PDFException |
Set page scaling option to be selected when a print dialog is displayed for PDF document.
[in] | print_scale | New page scaling option string. Please refer to values starting from com.foxit.sdk.pdf.DocViewerPrefs.e_PrintScaleNone and this should be one of these values. |
void com.foxit.sdk.pdf.DocViewerPrefs.setReadingDirection | ( | boolean | is_left_to_right | ) | throws com.foxit.sdk.PDFException |
Set the predominant reading direction for text.
The reading direction information has no direct effect on the document's contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up (that is, multiple PDF pages are printed on a single page).
[in] | is_left_to_right | The new reading direction: true means left-to-right reading order, while false means right-to-left reading order. |
void com.foxit.sdk.pdf.DocViewerPrefs.setUIDisplayStatus | ( | int | pref, |
boolean | value | ||
) | throws com.foxit.sdk.PDFException |
Set UI display status of a specified viewer preference item type.
If the viewer preference item type does not existed before and has never been set, the value would be false by default.
[in] | pref | A viewer preference item type. Please refer to values starting from com.foxit.sdk.pdf.DocViewerPrefs.e_HideToolbar and this should be one of these values. |
[in] | value | The new value for the specified viewer preference item type. |
void com.foxit.sdk.pdf.DocViewerPrefs.setViewArea | ( | int | box_type | ) | throws com.foxit.sdk.PDFException |
Set the page boundary representing the area of a page to be displayed when viewing the document on the screen.
[in] | box_type | The page box type. Please refer to values starting from com.foxit.sdk.pdf.PDFPage.e_MediaBox and this should be one of these values. |
void com.foxit.sdk.pdf.DocViewerPrefs.setViewClip | ( | int | box_type | ) | throws com.foxit.sdk.PDFException |
Set the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
[in] | box_type | The page box type. Please refer to values starting from com.foxit.sdk.pdf.PDFPage.e_MediaBox and this should be one of these values. |