Class PDViewerPreferences
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences
-
- All Implemented Interfaces:
COSObjectable
public class PDViewerPreferences extends java.lang.Object implements COSObjectable
This is the document viewing preferences.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPDViewerPreferences.BOUNDARYEnumeration containing all valid values for boundaries.static classPDViewerPreferences.DUPLEXEnumeration containing all valid values for duplex.static classPDViewerPreferences.NON_FULL_SCREEN_PAGE_MODEEnumeration containing all valid values for NonFullScreenPageMode.static classPDViewerPreferences.PRINT_SCALINGEnumeration containing all valid values for printscaling.static classPDViewerPreferences.READING_DIRECTIONEnumeration containing all valid values for ReadingDirection.
-
Field Summary
Fields Modifier and Type Field Description private COSDictionaryprefs
-
Constructor Summary
Constructors Constructor Description PDViewerPreferences()Constructor.PDViewerPreferences(COSDictionary dic)Constructor that is used for a preexisting dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancenterWindow()Get the center window preference.booleandisplayDocTitle()Get the display doc title preference.booleanfitWindow()Get the fit window preference.COSDictionarygetCOSObject()This will get the underlying dictionary that this object wraps.java.lang.StringgetDuplex()Get the Duplex preference.java.lang.StringgetNonFullScreenPageMode()Get the non full screen page mode preference.java.lang.StringgetPrintArea()Get the PrintArea preference.java.lang.StringgetPrintClip()Get the PrintClip preference.java.lang.StringgetPrintScaling()Get the PrintScaling preference.java.lang.StringgetReadingDirection()Get the reading direction preference.java.lang.StringgetViewArea()Get the ViewArea preference.java.lang.StringgetViewClip()Get the ViewClip preference.booleanhideMenubar()Get the menubar preference.booleanhideToolbar()Get the toolbar preference.booleanhideWindowUI()Get the window UI preference.voidsetCenterWindow(boolean value)Set the center window preference.voidsetDisplayDocTitle(boolean value)Set the display doc title preference.voidsetDuplex(PDViewerPreferences.DUPLEX value)Set the Duplex preference.voidsetFitWindow(boolean value)Set the fit window preference.voidsetHideMenubar(boolean value)Set the menubar preference.voidsetHideToolbar(boolean value)Set the toolbar preference.voidsetHideWindowUI(boolean value)Set the window UI preference.voidsetNonFullScreenPageMode(PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE value)Set the non full screen page mode preference.voidsetPrintArea(PDViewerPreferences.BOUNDARY value)Set the PrintArea preference.voidsetPrintClip(PDViewerPreferences.BOUNDARY value)Set the PrintClip preference.voidsetPrintScaling(PDViewerPreferences.PRINT_SCALING value)Set the PrintScaling preference.voidsetReadingDirection(PDViewerPreferences.READING_DIRECTION value)Set the reading direction preference.voidsetViewArea(PDViewerPreferences.BOUNDARY value)Set the ViewArea preference.voidsetViewClip(PDViewerPreferences.BOUNDARY value)Set the ViewClip preference.
-
-
-
Field Detail
-
prefs
private final COSDictionary prefs
-
-
Constructor Detail
-
PDViewerPreferences
public PDViewerPreferences()
Constructor.
-
PDViewerPreferences
public PDViewerPreferences(COSDictionary dic)
Constructor that is used for a preexisting dictionary.- Parameters:
dic- The underlying dictionary.
-
-
Method Detail
-
getCOSObject
public COSDictionary getCOSObject()
This will get the underlying dictionary that this object wraps.- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The underlying info dictionary.
-
hideToolbar
public boolean hideToolbar()
Get the toolbar preference.- Returns:
- the toolbar preference.
-
setHideToolbar
public void setHideToolbar(boolean value)
Set the toolbar preference.- Parameters:
value- Set the toolbar preference.
-
hideMenubar
public boolean hideMenubar()
Get the menubar preference.- Returns:
- the menubar preference.
-
setHideMenubar
public void setHideMenubar(boolean value)
Set the menubar preference.- Parameters:
value- Set the menubar preference.
-
hideWindowUI
public boolean hideWindowUI()
Get the window UI preference.- Returns:
- the window UI preference.
-
setHideWindowUI
public void setHideWindowUI(boolean value)
Set the window UI preference.- Parameters:
value- Set the window UI preference.
-
fitWindow
public boolean fitWindow()
Get the fit window preference.- Returns:
- the fit window preference.
-
setFitWindow
public void setFitWindow(boolean value)
Set the fit window preference.- Parameters:
value- Set the fit window preference.
-
centerWindow
public boolean centerWindow()
Get the center window preference.- Returns:
- the center window preference.
-
setCenterWindow
public void setCenterWindow(boolean value)
Set the center window preference.- Parameters:
value- Set the center window preference.
-
displayDocTitle
public boolean displayDocTitle()
Get the display doc title preference.- Returns:
- the display doc title preference.
-
setDisplayDocTitle
public void setDisplayDocTitle(boolean value)
Set the display doc title preference.- Parameters:
value- Set the display doc title preference.
-
getNonFullScreenPageMode
public java.lang.String getNonFullScreenPageMode()
Get the non full screen page mode preference.- Returns:
- the non full screen page mode preference.
-
setNonFullScreenPageMode
public void setNonFullScreenPageMode(PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE value)
Set the non full screen page mode preference.- Parameters:
value- Set the non full screen page mode preference.
-
getReadingDirection
public java.lang.String getReadingDirection()
Get the reading direction preference.- Returns:
- the reading direction preference.
-
setReadingDirection
public void setReadingDirection(PDViewerPreferences.READING_DIRECTION value)
Set the reading direction preference.- Parameters:
value- Set the reading direction preference.
-
getViewArea
public java.lang.String getViewArea()
Get the ViewArea preference. See BOUNDARY enumeration.- Returns:
- the ViewArea preference.
-
setViewArea
public void setViewArea(PDViewerPreferences.BOUNDARY value)
Set the ViewArea preference. See BOUNDARY enumeration.- Parameters:
value- Set the ViewArea preference.
-
getViewClip
public java.lang.String getViewClip()
Get the ViewClip preference. See BOUNDARY enumeration.- Returns:
- the ViewClip preference.
-
setViewClip
public void setViewClip(PDViewerPreferences.BOUNDARY value)
Set the ViewClip preference. See BOUNDARY enumeration.- Parameters:
value- Set the ViewClip preference.
-
getPrintArea
public java.lang.String getPrintArea()
Get the PrintArea preference. See BOUNDARY enumeration.- Returns:
- the PrintArea preference.
-
setPrintArea
public void setPrintArea(PDViewerPreferences.BOUNDARY value)
Set the PrintArea preference. See BOUNDARY enumeration.- Parameters:
value- Set the PrintArea preference.
-
getPrintClip
public java.lang.String getPrintClip()
Get the PrintClip preference. See BOUNDARY enumeration.- Returns:
- the PrintClip preference.
-
setPrintClip
public void setPrintClip(PDViewerPreferences.BOUNDARY value)
Set the PrintClip preference. See BOUNDARY enumeration.- Parameters:
value- Set the PrintClip preference.
-
getDuplex
public java.lang.String getDuplex()
Get the Duplex preference. See DUPLEX enumeration.- Returns:
- the Duplex preference.
-
setDuplex
public void setDuplex(PDViewerPreferences.DUPLEX value)
Set the Duplex preference. See DUPLEX enumeration.- Parameters:
value- Set the Duplex preference.
-
getPrintScaling
public java.lang.String getPrintScaling()
Get the PrintScaling preference. See PRINT_SCALING enumeration.- Returns:
- the PrintScaling preference.
-
setPrintScaling
public void setPrintScaling(PDViewerPreferences.PRINT_SCALING value)
Set the PrintScaling preference. See PRINT_SCALING enumeration.- Parameters:
value- Set the PrintScaling preference.
-
-