public class PDFDocViewPrefs
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
e_CenterWindow
The Constant e_CenterWindow.
|
static 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.
|
static int |
e_DisplayDocTitle
The Constant e_DisplayDocTitle.
|
static int |
e_FitWindow
The Constant e_FitWindow.
|
static int |
e_FullScreen
The Constant e_FullScreen.
|
static int |
e_HideMenubar
The Constant e_HideMenubar.
|
static int |
e_HideToolbar
ViewerPref enumeration specifies how various GUI elements should behave
when the document is opened.
|
static int |
e_HideWindowUI
The Constant e_HideWindowUI.
|
static int |
e_OneColumn
The Constant e_OneColumn.
|
static int |
e_SinglePage
The Constant e_SinglePage.
|
static int |
e_TwoColumnLeft
The Constant e_TwoColumnLeft.
|
static int |
e_TwoColumnRight
The Constant e_TwoColumnRight.
|
static int |
e_TwoPageLeft
The Constant e_TwoPageLeft.
|
static int |
e_TwoPageRight
The Constant e_TwoPageRight.
|
static int |
e_UseAttachments
The Constant e_UseAttachments.
|
static int |
e_UseBookmarks
The Constant e_UseBookmarks.
|
static int |
e_UseNone
PageMode specifies how the document should be displayed when opened:
- e_UseNone Displays document, but neither thumbnails nor bookmarks.
|
static int |
e_UseOC
The Constant e_UseOC.
|
static int |
e_UseThumbs
The Constant e_UseThumbs.
|
Constructor and Description |
---|
PDFDocViewPrefs(Obj tr)
PDFDocViewPrefs constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int e_UseNone
public static final int e_UseThumbs
public static final int e_UseBookmarks
public static final int e_FullScreen
public static final int e_UseOC
public static final int e_UseAttachments
public static final int e_Default
public static final int e_SinglePage
public static final int e_OneColumn
public static final int e_TwoColumnLeft
public static final int e_TwoColumnRight
public static final int e_TwoPageLeft
public static final int e_TwoPageRight
public static final int e_HideToolbar
public static final int e_HideMenubar
public static final int e_HideWindowUI
public static final int e_FitWindow
public static final int e_CenterWindow
public static final int e_DisplayDocTitle
public PDFDocViewPrefs(Obj tr)
tr
- public void setInitialPage(Destination dest) throws PDFNetException
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);
public void setPageMode(int mode) throws PDFNetException
mode
- New PageMode setting. Default value is e_UseNone.PDFNetException
public int getPageMode() throws PDFNetException
PDFNetException
public void setLayoutMode(int layout) throws PDFNetException
layout
- the new layout modePDFNetException
public int getLayoutMode() throws PDFNetException
PDFNetException
public void setPref(int pref, boolean value) throws PDFNetException
pref
- the ViewerPref property type to modifiy.value
- The new value for the property.PDFNetException
public boolean getPref(int pref) throws PDFNetException
pref
- the ViewerPref property type to query.PDFNetException
public void setNonFullScreenPageMode(int mode) throws PDFNetException
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
public int getNonFullScreenPageMode() throws PDFNetException
Note: This entry is meaningful only if the value of the PageMode is set to e_FullScreen; it is ignored otherwise.
PDFNetException
public void setDirection(boolean left_to_right) throws PDFNetException
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
public boolean getDirection() throws PDFNetException
PDFNetException
public void setViewArea(int box) throws PDFNetException
box
- page boundary displayed when viewing the document on the
screen. By defualt, PDF viewers will display the crop-box.PDFNetException
public int getViewArea() throws PDFNetException
PDFNetException
public void setViewClip(int box) throws PDFNetException
box
- screen clip region. The default value is page crop-box.PDFNetException
public int getViewClip() throws PDFNetException
PDFNetException
public void setPrintArea(int box) throws PDFNetException
box
- printing region. The default value is page crop-box.PDFNetException
public int getPrintArea() throws PDFNetException
PDFNetException
public void setPrintClip(int box) throws PDFNetException
box
- printing clip region. The default value is page crop-box.PDFNetException
public int getPrintClip() throws PDFNetException
PDFNetException
public Obj getSDFObj()