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 class
PDViewerPreferences.BOUNDARY
Enumeration containing all valid values for boundaries.static class
PDViewerPreferences.DUPLEX
Enumeration containing all valid values for duplex.static class
PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
Enumeration containing all valid values for NonFullScreenPageMode.static class
PDViewerPreferences.PRINT_SCALING
Enumeration containing all valid values for printscaling.static class
PDViewerPreferences.READING_DIRECTION
Enumeration containing all valid values for ReadingDirection.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PDViewerPreferences(COSDictionary dic)
Constructor that is used for a preexisting dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
centerWindow()
Get the center window preference.boolean
displayDocTitle()
Get the display doc title preference.boolean
fitWindow()
Get the fit window preference.COSDictionary
getCOSObject()
This will get the underlying dictionary that this object wraps.java.lang.String
getDuplex()
Get the Duplex preference.java.lang.String
getNonFullScreenPageMode()
Get the non full screen page mode preference.java.lang.String
getPrintArea()
Get the PrintArea preference.java.lang.String
getPrintClip()
Get the PrintClip preference.java.lang.String
getPrintScaling()
Get the PrintScaling preference.java.lang.String
getReadingDirection()
Get the reading direction preference.java.lang.String
getViewArea()
Get the ViewArea preference.java.lang.String
getViewClip()
Get the ViewClip preference.boolean
hideMenubar()
Get the menubar preference.boolean
hideToolbar()
Get the toolbar preference.boolean
hideWindowUI()
Get the window UI preference.void
setCenterWindow(boolean value)
Set the center window preference.void
setDisplayDocTitle(boolean value)
Set the display doc title preference.void
setDuplex(PDViewerPreferences.DUPLEX value)
Set the Duplex preference.void
setFitWindow(boolean value)
Set the fit window preference.void
setHideMenubar(boolean value)
Set the menubar preference.void
setHideToolbar(boolean value)
Set the toolbar preference.void
setHideWindowUI(boolean value)
Set the window UI preference.void
setNonFullScreenPageMode(java.lang.String value)
Deprecated.void
setNonFullScreenPageMode(PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE value)
Set the non full screen page mode preference.void
setPrintArea(java.lang.String value)
Deprecated.void
setPrintArea(PDViewerPreferences.BOUNDARY value)
Set the PrintArea preference.void
setPrintClip(java.lang.String value)
Deprecated.void
setPrintClip(PDViewerPreferences.BOUNDARY value)
Set the PrintClip preference.void
setPrintScaling(PDViewerPreferences.PRINT_SCALING value)
Set the PrintScaling preference.void
setReadingDirection(java.lang.String value)
Deprecated.void
setReadingDirection(PDViewerPreferences.READING_DIRECTION value)
Set the reading direction preference.void
setViewArea(java.lang.String value)
Deprecated.void
setViewArea(PDViewerPreferences.BOUNDARY value)
Set the ViewArea preference.void
setViewClip(java.lang.String value)
Deprecated.void
setViewClip(PDViewerPreferences.BOUNDARY value)
Set the ViewClip preference.
-
-
-
Field Detail
-
NON_FULL_SCREEN_PAGE_MODE_USE_NONE
public static final java.lang.String NON_FULL_SCREEN_PAGE_MODE_USE_NONE
Deprecated.usePDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
insteadFrom PDF Reference: "Neither document outline nor thumbnail images visible".- See Also:
- Constant Field Values
-
NON_FULL_SCREEN_PAGE_MODE_USE_OUTLINES
public static final java.lang.String NON_FULL_SCREEN_PAGE_MODE_USE_OUTLINES
Deprecated.usePDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
insteadFrom PDF Reference: "Document outline visible".- See Also:
- Constant Field Values
-
NON_FULL_SCREEN_PAGE_MODE_USE_THUMBS
public static final java.lang.String NON_FULL_SCREEN_PAGE_MODE_USE_THUMBS
Deprecated.usePDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
insteadFrom PDF Reference: "Thumbnail images visible".- See Also:
- Constant Field Values
-
NON_FULL_SCREEN_PAGE_MODE_USE_OPTIONAL_CONTENT
public static final java.lang.String NON_FULL_SCREEN_PAGE_MODE_USE_OPTIONAL_CONTENT
Deprecated.usePDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
insteadFrom PDF Reference: "Optional content group panel visible".- See Also:
- Constant Field Values
-
READING_DIRECTION_L2R
public static final java.lang.String READING_DIRECTION_L2R
Deprecated.usePDViewerPreferences.READING_DIRECTION
insteadReading direction.- See Also:
- Constant Field Values
-
READING_DIRECTION_R2L
public static final java.lang.String READING_DIRECTION_R2L
Deprecated.usePDViewerPreferences.READING_DIRECTION
insteadReading direction.- See Also:
- Constant Field Values
-
BOUNDARY_MEDIA_BOX
public static final java.lang.String BOUNDARY_MEDIA_BOX
Deprecated.usePDViewerPreferences.BOUNDARY
insteadBoundary constant.- See Also:
- Constant Field Values
-
BOUNDARY_CROP_BOX
public static final java.lang.String BOUNDARY_CROP_BOX
Deprecated.usePDViewerPreferences.BOUNDARY
insteadBoundary constant.- See Also:
- Constant Field Values
-
BOUNDARY_BLEED_BOX
public static final java.lang.String BOUNDARY_BLEED_BOX
Deprecated.usePDViewerPreferences.BOUNDARY
insteadBoundary constant.- See Also:
- Constant Field Values
-
BOUNDARY_TRIM_BOX
public static final java.lang.String BOUNDARY_TRIM_BOX
Deprecated.usePDViewerPreferences.BOUNDARY
insteadBoundary constant.- See Also:
- Constant Field Values
-
BOUNDARY_ART_BOX
public static final java.lang.String BOUNDARY_ART_BOX
Deprecated.usePDViewerPreferences.BOUNDARY
insteadBoundary constant.- See Also:
- Constant Field Values
-
prefs
private final COSDictionary prefs
-
-
Constructor Detail
-
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:
getCOSObject
in 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.
-
setNonFullScreenPageMode
public void setNonFullScreenPageMode(java.lang.String value)
Deprecated.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.
-
setReadingDirection
public void setReadingDirection(java.lang.String value)
Deprecated.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(java.lang.String value)
Deprecated.Set the ViewArea preference. See BOUNDARY_XXX constants.- Parameters:
value
- Set 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.
-
setViewClip
public void setViewClip(java.lang.String value)
Deprecated.Set the ViewClip preference. See BOUNDARY_XXX constants.- 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(java.lang.String value)
Deprecated.Set the PrintArea preference. See BOUNDARY_XXX constants.- Parameters:
value
- Set 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(java.lang.String value)
Deprecated.Set the PrintClip preference. See BOUNDARY_XXX constants.- Parameters:
value
- Set 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.
-
-