java.lang.Object | |
↳ | com.pdftron.pdf.PDFDocViewPrefs |
PDFDocViewPrefs is a high-level utility class that can be used to control the way the document is to be presented on the screen or in print. PDFDocViewPrefs class corresponds to PageMode, PageLayout, and ViewerPreferences entries in the document's catalog. For more details please refer to section 8.1 'Viewer Preferences' in PDF Reference Manual.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_CenterWindow | The Constant e_CenterWindow. | |||||||||
int | e_Default | PageLayout specifies the page layout to be used when the document is opened: - e_SinglePage Display one page at a time - e_OneColumn Display the pages in one-column mode. | |||||||||
int | e_DisplayDocTitle | The Constant e_DisplayDocTitle. | |||||||||
int | e_FitWindow | The Constant e_FitWindow. | |||||||||
int | e_FullScreen | The Constant e_FullScreen. | |||||||||
int | e_HideMenubar | The Constant e_HideMenubar. | |||||||||
int | e_HideToolbar | ViewerPref enumeration specifies how various GUI elements should behave when the document is opened. | |||||||||
int | e_HideWindowUI | The Constant e_HideWindowUI. | |||||||||
int | e_OneColumn | The Constant e_OneColumn. | |||||||||
int | e_SinglePage | The Constant e_SinglePage. | |||||||||
int | e_TwoColumnLeft | The Constant e_TwoColumnLeft. | |||||||||
int | e_TwoColumnRight | The Constant e_TwoColumnRight. | |||||||||
int | e_TwoPageLeft | The Constant e_TwoPageLeft. | |||||||||
int | e_TwoPageRight | The Constant e_TwoPageRight. | |||||||||
int | e_UseAttachments | The Constant e_UseAttachments. | |||||||||
int | e_UseBookmarks | The Constant e_UseBookmarks. | |||||||||
int | e_UseNone | PageMode specifies how the document should be displayed when opened: - e_UseNone Displays document, but neither thumbnails nor bookmarks. | |||||||||
int | e_UseOC | The Constant e_UseOC. | |||||||||
int | e_UseThumbs | The Constant e_UseThumbs. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PDFDocViewPrefs(Obj tr)
PDFDocViewPrefs constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
getDirection()
Get the direction.
| ||||||||||
int |
getLayoutMode()
Get the layout mode.
| ||||||||||
int |
getNonFullScreenPageMode()
Get the non full screen page mode.
| ||||||||||
int |
getPageMode()
Get the page mode.
| ||||||||||
boolean |
getPref(int pref)
Get the value of given ViewerPref property.
| ||||||||||
int |
getPrintArea()
Get the prints the area.
| ||||||||||
int |
getPrintClip()
Get the prints the clip.
| ||||||||||
Obj |
getSDFObj()
Get the underlying SDFObj.
| ||||||||||
int |
getViewArea()
Get the view area.
| ||||||||||
int |
getViewClip()
Get the view clip.
| ||||||||||
void |
setDirection(boolean left_to_right)
Set the predominant reading order for text.
| ||||||||||
void |
setInitialPage(Destination dest)
A utility method used to set the fist page displayed after the document
is opened.
| ||||||||||
void |
setLayoutMode(int layout)
Set PageLayout property and change the value of the PageLayout key in the
Catalog dictionary.
| ||||||||||
void |
setNonFullScreenPageMode(int mode)
Set the document's page mode, specifying how to display the document on
exiting full-screen mode.
| ||||||||||
void |
setPageMode(int mode)
Set PageMode property and change the value of the PageMode key in the
Catalog dictionary.
| ||||||||||
void |
setPref(int pref, boolean value)
Set the value of given ViewerPref property.
| ||||||||||
void |
setPrintArea(int box)
Set the page boundary representing the area of a page to be rendered when
printing the document.
| ||||||||||
void |
setPrintClip(int box)
Set the page boundary to which the contents of a page are to be clipped
when printing the document.
| ||||||||||
void |
setViewArea(int box)
Set the page boundary representing the area of a page to be displayed
when viewing the document on the screen.
| ||||||||||
void |
setViewClip(int box)
Set the page boundary to which the contents of a page are to be clipped
when viewing the document on the screen.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The Constant e_CenterWindow.
PageLayout specifies the page layout to be used when the document is opened: - e_SinglePage Display one page at a time - e_OneColumn Display the pages in one-column mode. - e_TwoColumnLeft Display the pages in two-column continuous mode with first page on left (i.e. all odd numbered pages on the left). - e_TwoColumnRight Display the pages in two-column continuous mode with first page on right (i.e. all odd numbered pages on the right). - e_TwoPageLeft Display the pages two at a time, with odd-numbered pages on the left. - e_TwoPageRight Display the pages two at a time, with odd-numbered pages on the right.
The Constant e_DisplayDocTitle.
The Constant e_FitWindow.
The Constant e_FullScreen.
The Constant e_HideMenubar.
ViewerPref enumeration specifies how various GUI elements should behave when the document is opened. - e_HideToolbar A flag specifying whether to hide the viewer application's toolbars when the document is active. Default value: false. - e_HideMenubar A flag specifying whether to hide the viewer application's menu bar when the document is active. Default value: false. - e_HideWindowUI 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. Default value: false. - e_FitWindow A flag specifying whether to resize the document's window to fit the size of the first displayed page. Default value: false. - e_CenterWindow A flag specifying whether to position the document's window in the center of the screen. Default value: false. - e_DisplayDocTitle 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. Default value: false.
The Constant e_HideWindowUI.
The Constant e_OneColumn.
The Constant e_SinglePage.
The Constant e_TwoColumnLeft.
The Constant e_TwoColumnRight.
The Constant e_TwoPageLeft.
The Constant e_TwoPageRight.
The Constant e_UseAttachments.
The Constant e_UseBookmarks.
PageMode specifies how the document should be displayed when opened: - e_UseNone Displays document, but neither thumbnails nor bookmarks. - e_UseThumbs Displays document plus thumbnails. - e_UseBookmarks Displays document plus bookmarks. - e_FullScreen Displays document in full-screen viewing mode. - e_UseOC Displays Optional Content (OC) group panel. - e_UseAttachments - Displays attachments panel.
The Constant e_UseOC.
The Constant e_UseThumbs.
PDFDocViewPrefs constructor. Typically this constructor is never used since it is easier to obtain PDFDocViewPrefs using PDFDoc.GetViewPrefs()
Get the direction.
PDFNetException |
---|
Get the layout mode.
PDFNetException |
---|
Get the non full screen page mode.
Note: This entry is meaningful only if the value of the PageMode is set to e_FullScreen; it is ignored otherwise.
PDFNetException |
---|
Get the page mode.
PDFNetException |
---|
Get the value of given ViewerPref property.
pref | the ViewerPref property type to query. |
---|
PDFNetException |
---|
Get the prints the area.
PDFNetException |
---|
Get the prints the clip.
PDFNetException |
---|
Get the underlying SDFObj.
Get the view area.
PDFNetException |
---|
Get the view clip.
PDFNetException |
---|
Set the predominant reading order for text. This flag 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.
left_to_right | - true if the predominant reading order for text is from left to right and false if it is right to left (including vertical writing systems, such as Chinese, Japanese, and Korean). Default value: left_to_right is true. |
---|
PDFNetException |
---|
A utility method used to set the fist page displayed after the document is opened. This method is equivalent to PDFDoc::SetOpenAction(goto_action). If OpenAction is not specified the document should be opened to the top of the first page at the default magnification factor.
dest | A value specifying the page destination to be displayed when the document is opened. |
---|
PDFNetException | Destination dest = Destination::CreateFit(page);
pdfdoc.GetViewPrefs().SetInitialPage(dest);
|
---|
Set PageLayout property and change the value of the PageLayout key in the Catalog dictionary.
layout | the new layout mode |
---|
PDFNetException |
---|
Set the document's page mode, specifying how to display the document on exiting full-screen mode.
Note: This entry is meaningful only if the value of the PageMode is set to e_FullScreen; it is ignored otherwise.
mode | PageMode used after exiting full-screen mode. Default value: e_UseNone. |
---|
PDFNetException |
---|
Set PageMode property and change the value of the PageMode key in the Catalog dictionary.
mode | New PageMode setting. Default value is e_UseNone. |
---|
PDFNetException |
---|
Set the value of given ViewerPref property.
pref | the ViewerPref property type to modifiy. |
---|---|
value | The new value for the property. |
PDFNetException |
---|
Set the page boundary representing the area of a page to be rendered when printing the document.
box | printing region. The default value is page crop-box. |
---|
PDFNetException |
---|
Set the page boundary to which the contents of a page are to be clipped when printing the document.
box | printing clip region. The default value is page crop-box. |
---|
PDFNetException |
---|
Set the page boundary representing the area of a page to be displayed when viewing the document on the screen.
box | page boundary displayed when viewing the document on the screen. By defualt, PDF viewers will display the crop-box. |
---|
PDFNetException |
---|
Set the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
box | screen clip region. The default value is page crop-box. |
---|
PDFNetException |
---|