Package org.jpedal.constants
Class ViewerPreferences
java.lang.Object
org.jpedal.constants.ViewerPreferences
PDF Viewer Preferences.
Each property corresponds to the PDF specification fields.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the logical content order for text.static enumRepresents a duplexstatic enumRepresents a page boundary.static enumRepresents print scaling. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe predominant logical content order for text.The duplex option when printing the PDF.String[]An array of names of viewer preference settings that shall be enforced by PDF processors and not overridden by user interface selections.The document’s page mode when exiting full-screen mode.intThe number of copies to be printed when the print dialogue is opened.The page boundary representing the area of a page rendered when printing.The page boundary to which the contents of a page shall be clipped when printing.int[]The page ranges used to initialize the print dialogue box when printing.The page scaling option used in print dialogue.The page boundary representing the area of a page displayed when viewing on screen.The page boundary to which the contents of a page shall be clipped when viewing on screen.booleanA flag specifying whether to position the document’s window in the centre of the screen.booleanA flag specifying whether the window’s title bar should display the document title taken from the XMP metadata stream.booleanA flag specifying whether to resize the document’s window to fit the size of the first displayed page.booleanA flag specifying whether to hide the interactive PDF processor’s menu bar when the document is active.booleanA flag specifying whether to hide the interactive PDF processor’s tool bars when the document is active.booleanA 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.booleanA flag specifying whether the PDF page size is used to select the input paper tray.voidsetCenterWindow(boolean centerWindow) Set the centerWindow value.voidsetDirection(ViewerPreferences.Direction direction) Set the direction value.voidsetDisplayDocTitle(boolean displayDocTitle) Set the displayDocTitle value.voidsetDuplex(ViewerPreferences.Duplex duplex) Set the duplex value.voidsetEnforce(String[] enforce) Set the enforce value.voidsetFitWindow(boolean fitWindow) Set the fitWindow value.voidsetHideMenubar(boolean hideMenubar) Set the hideMenubar value.voidsetHideToolbar(boolean hideToolbar) Set the hideToolbar value.voidsetHideWindowUI(boolean hideWindowUI) Set the hideWindowUI value.voidsetNonFullScreenPageMode(PageMode nonFullScreenPageMode) Set the nonFullScreenPageMode value.voidsetNumCopies(int numCopies) Set the numCopies value.voidsetPickTrayByPDFSize(boolean pickTrayByPDFSize) Set the pickTrayByPDFSize value.voidsetPrintArea(ViewerPreferences.PageBoundary printArea) Set the printArea value.voidsetPrintClip(ViewerPreferences.PageBoundary printClip) Set the printClip value.voidsetPrintPageRange(int[] printPageRange) voidsetPrintScaling(ViewerPreferences.PrintScaling printScaling) Set the printScaling value.voidsetViewArea(ViewerPreferences.PageBoundary viewArea) Set the viewArea value.voidsetViewClip(ViewerPreferences.PageBoundary viewClip) Set the viewClip value.
-
Constructor Details
-
ViewerPreferences
public ViewerPreferences()
-
-
Method Details
-
isHideToolbar
public boolean isHideToolbar()A flag specifying whether to hide the interactive PDF processor’s tool bars when the document is active. Default value:false. -
setHideToolbar
public void setHideToolbar(boolean hideToolbar) Set the hideToolbar value.- Parameters:
hideToolbar- the value to set
-
isHideMenubar
public boolean isHideMenubar()A flag specifying whether to hide the interactive PDF processor’s menu bar when the document is active. Default value:false. -
setHideMenubar
public void setHideMenubar(boolean hideMenubar) Set the hideMenubar value.- Parameters:
hideMenubar- the value to set
-
isHideWindowUI
public boolean isHideWindowUI()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. -
setHideWindowUI
public void setHideWindowUI(boolean hideWindowUI) Set the hideWindowUI value.- Parameters:
hideWindowUI- the value to set
-
isFitWindow
public boolean isFitWindow()A flag specifying whether to resize the document’s window to fit the size of the first displayed page. Default value:false. -
setFitWindow
public void setFitWindow(boolean fitWindow) Set the fitWindow value.- Parameters:
fitWindow- the value to set
-
isCenterWindow
public boolean isCenterWindow()A flag specifying whether to position the document’s window in the centre of the screen. Default value:false. -
setCenterWindow
public void setCenterWindow(boolean centerWindow) Set the centerWindow value.- Parameters:
centerWindow- the value to set
-
isDisplayDocTitle
public boolean isDisplayDocTitle()A flag specifying whether the window’s title bar should display the document title taken from the XMP metadata stream. Iffalse, the title bar displays the file name. Default value:false. -
setDisplayDocTitle
public void setDisplayDocTitle(boolean displayDocTitle) Set the displayDocTitle value.- Parameters:
displayDocTitle- the value to set
-
getNonFullScreenPageMode
The document’s page mode when exiting full-screen mode. A value ofPageMode.FULL_SCREENis invalid. Default value:PageMode.USE_NONE. -
setNonFullScreenPageMode
Set the nonFullScreenPageMode value. A value ofPageMode.FULL_SCREENis invalid.- Parameters:
nonFullScreenPageMode- the value to set
-
getDirection
The predominant logical content order for text. Default value:ViewerPreferences.Direction.L2R. -
setDirection
Set the direction value.- Parameters:
direction- the value to set
-
getViewArea
The page boundary representing the area of a page displayed when viewing on screen. Default value:ViewerPreferences.PageBoundary.CROP_BOX.Deprecated in PDF 2.0.
-
setViewArea
Set the viewArea value.- Parameters:
viewArea- the value to set
-
getViewClip
The page boundary to which the contents of a page shall be clipped when viewing on screen. Default value:ViewerPreferences.PageBoundary.CROP_BOX.Deprecated in PDF 2.0.
-
setViewClip
Set the viewClip value.- Parameters:
viewClip- the value to set
-
getPrintArea
The page boundary representing the area of a page rendered when printing. Default value:ViewerPreferences.PageBoundary.CROP_BOX.Deprecated in PDF 2.0.
-
setPrintArea
Set the printArea value.- Parameters:
printArea- the value to set
-
getPrintClip
The page boundary to which the contents of a page shall be clipped when printing. Default value:ViewerPreferences.PageBoundary.CROP_BOX.Deprecated in PDF 2.0.
-
setPrintClip
Set the printClip value.- Parameters:
printClip- the value to set
-
getPrintScaling
The page scaling option used in print dialogue. Default value:ViewerPreferences.PrintScaling.APP_DEFAULT. -
setPrintScaling
Set the printScaling value.- Parameters:
printScaling- the value to set
-
getDuplex
The duplex option when printing the PDF. Default value: implementation dependent. -
setDuplex
Set the duplex value.- Parameters:
duplex- the value to set
-
isPickTrayByPDFSize
public boolean isPickTrayByPDFSize()A flag specifying whether the PDF page size is used to select the input paper tray. Default value: implementation dependent. -
setPickTrayByPDFSize
public void setPickTrayByPDFSize(boolean pickTrayByPDFSize) Set the pickTrayByPDFSize value.- Parameters:
pickTrayByPDFSize- the value to set.
-
getPrintPageRange
public int[] getPrintPageRange()The page ranges used to initialize the print dialogue box when printing. Represented as an array of integers in pairs [startPage, endPage]. Default value: implementation dependent. -
setPrintPageRange
public void setPrintPageRange(int[] printPageRange) -
getNumCopies
public int getNumCopies()The number of copies to be printed when the print dialogue is opened. Default value: implementation dependent (typically 1). -
setNumCopies
public void setNumCopies(int numCopies) Set the numCopies value.- Parameters:
numCopies- the value to set
-
getEnforce
An array of names of viewer preference settings that shall be enforced by PDF processors and not overridden by user interface selections. -
setEnforce
Set the enforce value. Names must NOT be preceded with a solidus (forward-slash)- Parameters:
enforce- the value to set
-