Public Types | |
enum | PrintScale { PrintScale.e_PrintScaleNone = 0, PrintScale.e_PrintScaleAppDefault = 1 } |
Enumeration for page scaling option. More... | |
enum | ViewerPref { ViewerPref.e_HideToolbar = 0, ViewerPref.e_HideMenubar = 1, ViewerPref.e_HideWindowUI = 2, ViewerPref.e_FitWindow = 3, ViewerPref.e_CenterWindow = 4, ViewerPref.e_DisplayDocTitle = 5 } |
Enumeration for how various GUI elements should behave when the document is opened. More... | |
Public Member Functions | |
DocViewerPrefs (foxit.pdf.PDFDoc document, PDFDictionary pdf_dict) | |
Constructor, with parameters. More... | |
DocViewerPrefs (DocViewerPrefs other) | |
Constructor, with another DocViewerPrefs object. More... | |
PDFDictionary | GetDict () |
Get PDF dictionary from current object. More... | |
PDFDoc.DisplayMode | GetNonFullScreenPageMode () |
Get display mode which specifies how to display the document on exiting full-screen mode when document's display mode is full-screen. More... | |
PDFPage.BoxType | GetPrintArea () |
Get the page boundary representing the area of a page to be rendered when printing the document. More... | |
PDFPage.BoxType | GetPrintClip () |
Get the page boundary to which the contents of a page are to be clipped when printing the document. More... | |
int | GetPrintCopies () |
Get the number of copies to be printed when the print dialog is opened for PDF document. More... | |
Range | GetPrintRange () |
Get page range information which is used to initialize the print dialog when the print dialog is opened for the PDF document. More... | |
DocViewerPrefs.PrintScale | GetPrintScale () |
Get page scaling option to be selected when a print dialog is displayed for PDF document. More... | |
bool | GetReadingDirection () |
Get the predominant reading direction for text. More... | |
bool | GetUIDisplayStatus (DocViewerPrefs.ViewerPref pref) |
Get UI display status of a specified viewer preference item type. More... | |
PDFPage.BoxType | GetViewArea () |
Get the page boundary representing the area of a page to be displayed when viewing the document on the screen. More... | |
PDFPage.BoxType | GetViewClip () |
Get the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. More... | |
bool | IsEmpty () |
Check whether current object is empty or not. More... | |
void | SetNonFullScreenPageMode (PDFDoc.DisplayMode display_mode) |
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 (PDFPage.BoxType box_type) |
Set the page boundary representing the area of a page to be rendered when printing the document. More... | |
void | SetPrintClip (PDFPage.BoxType box_type) |
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) |
Set the number of copies to be printed when the print dialog is opened for PDF document. More... | |
void | SetPrintRange (Range page_range) |
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 (DocViewerPrefs.PrintScale print_scale) |
Set page scaling option to be selected when a print dialog is displayed for PDF document. More... | |
void | SetReadingDirection (bool is_left_to_right) |
Set the predominant reading direction for text. More... | |
void | SetUIDisplayStatus (DocViewerPrefs.ViewerPref pref, bool value) |
Set UI display status of a specified viewer preference item type. More... | |
void | SetViewArea (PDFPage.BoxType box_type) |
Set the page boundary representing the area of a page to be displayed when viewing the document on the screen. More... | |
void | SetViewClip (PDFPage.BoxType box_type) |
Set the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. More... | |
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.
|
strong |
|
strong |
Enumeration for how various GUI elements should behave when the document is opened.
Values of this enumeration should be used alone.
|
inline |
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 DocViewerPrefs object to be associated with these information; if there is no such information in the specified PDF document, the constructed DocViewerPrefs object can be used to set these information to PDF document.
document | A valid PDF document object. |
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. |
|
inline |
Constructor, with another DocViewerPrefs object.
other | Another DocViewerPrefs object. |
|
inline |
Get PDF dictionary from current object.
|
inline |
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 pdf::PDFDoc::GetDisplayMode can be used to check document's displaying mode.
|
inline |
Get the page boundary representing the area of a page to be rendered when printing the document.
|
inline |
Get the page boundary to which the contents of a page are to be clipped when printing the document.
|
inline |
Get the number of copies to be printed when the print dialog is opened for PDF document.
|
inline |
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 e_ErrFormat.
|
inline |
Get page scaling option to be selected when a print dialog is displayed for PDF document.
|
inline |
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.
|
inline |
Get UI display status of a specified viewer preference item type.
pref | A viewer preference item type. Please refer to e_XXX values and it should be one of these values. |
|
inline |
Get the page boundary representing the area of a page to be displayed when viewing the document on the screen.
|
inline |
Get the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
|
inline |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
|
inline |
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 pdf::PDFDoc::GetDisplayMode can be used to document's displaying mode.
display_mode | New display mode when exiting full-screen mode. It should be one of following values: e_DisplayUseNone e_DisplayUseOutlines e_DisplayUseThumbs e_DisplayUseOC |
|
inline |
Set the page boundary representing the area of a page to be rendered when printing the document.
box_type | The page box type. Please refer to e_XXXBox values and this should be one of these values. |
|
inline |
Set the page boundary to which the contents of a page are to be clipped when printing the document.
box_type | The page box type. Please refer to e_XXXBox values and this should be one of these values. |
|
inline |
Set the number of copies to be printed when the print dialog is opened for PDF document.
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. |
|
inline |
Set the page range which is used to initialize the print dialog when the print dialog is opened for the PDF document.
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 pdf::PDFDoc::GetPageCount. |
|
inline |
Set page scaling option to be selected when a print dialog is displayed for PDF document.
print_scale | New page scaling option string. Please refer to e_PrintScaleXXX values and it should be one of these values. |
|
inline |
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.
is_left_to_right | The new reading direction: true means left-to-right reading order, while false means right-to-left reading order. |
|
inline |
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.
pref | A viewer preference item type. Please refer to e_XXX values and it should be one of these values. |
value | The new value for the specified viewer preference item type. |
|
inline |
Set the page boundary representing the area of a page to be displayed when viewing the document on the screen.
box_type | The page box type. Please refer to e_XXXBox values and this should be one of these values. |
|
inline |
Set the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
box_type | The page box type. Please refer to e_XXXBox values and this should be one of these values. |