Top Description Inners Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.viewerpreferences

public Class PDViewerPreferences

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.pdmodel.common.COSObjectable

This is the document viewing preferences.
Author
Ben Litchfield

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
PDViewerPreferences.BOUNDARY

Enumeration containing all valid values for boundaries.

public static enum
PDViewerPreferences.DUPLEX

Enumeration containing all valid values for duplex.

public static enum
PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE

Enumeration containing all valid values for NonFullScreenPageMode.

public static enum
PDViewerPreferences.READING_DIRECTION

Enumeration containing all valid values for ReadingDirection.

Field Summary

Modifier and TypeField and Description
private final COSDictionary

Constructor Summary

AccessConstructor and Description
public
PDViewerPreferences()

Constructor.

public
PDViewerPreferences(COSDictionary
The underlying dictionary.
dic
)

Constructor that is used for a preexisting dictionary.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

the center window preference.
centerWindow
()

Get the center window preference.

public boolean

Returns:

the display doc title preference.
displayDocTitle
()

Get the display doc title preference.

public boolean

Returns:

the fit window preference.
fitWindow
()

Get the fit window preference.

public COSDictionary

Returns:

The underlying info dictionary.
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

This will get the underlying dictionary that this object wraps.

public String

Returns:

the Duplex preference.
getDuplex
()

Get the Duplex preference.

public String

Returns:

the non full screen page mode preference.
getNonFullScreenPageMode
()

Get the non full screen page mode preference.

public String

Returns:

the PrintArea preference.
getPrintArea
()

Get the PrintArea preference.

public String

Returns:

the PrintClip preference.
getPrintClip
()

Get the PrintClip preference.

public String

Returns:

the PrintScaling preference.
getPrintScaling
()

Get the PrintScaling preference.

public String

Returns:

the reading direction preference.
getReadingDirection
()

Get the reading direction preference.

public String

Returns:

the ViewArea preference.
getViewArea
()

Get the ViewArea preference.

public String

Returns:

the ViewClip preference.
getViewClip
()

Get the ViewClip preference.

public boolean

Returns:

the menubar preference.
hideMenubar
()

Get the menubar preference.

public boolean

Returns:

the toolbar preference.
hideToolbar
()

Get the toolbar preference.

public boolean

Returns:

the window UI preference.
hideWindowUI
()

Get the window UI preference.

public void
setCenterWindow(boolean
Set the center window preference.
value
)

Set the center window preference.

public void
setDisplayDocTitle(boolean
Set the display doc title preference.
value
)

Set the display doc title preference.

public void
setDuplex(PDViewerPreferences.DUPLEX
Set the Duplex preference.
value
)

Set the Duplex preference.

public void
setFitWindow(boolean
Set the fit window preference.
value
)

Set the fit window preference.

public void
setHideMenubar(boolean
Set the menubar preference.
value
)

Set the menubar preference.

public void
setHideToolbar(boolean
Set the toolbar preference.
value
)

Set the toolbar preference.

public void
setHideWindowUI(boolean
Set the window UI preference.
value
)

Set the window UI preference.

public void
setNonFullScreenPageMode(PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
Set the non full screen page mode preference.
value
)

Set the non full screen page mode preference.

public void
setPrintArea(PDViewerPreferences.BOUNDARY
Set the PrintArea preference.
value
)

Set the PrintArea preference.

public void
setPrintClip(PDViewerPreferences.BOUNDARY
Set the PrintClip preference.
value
)

Set the PrintClip preference.

public void
setPrintScaling(PDViewerPreferences.PRINT_SCALING
Set the PrintScaling preference.
value
)

Set the PrintScaling preference.

public void
setReadingDirection(PDViewerPreferences.READING_DIRECTION
Set the reading direction preference.
value
)

Set the reading direction preference.

public void
setViewArea(PDViewerPreferences.BOUNDARY
Set the ViewArea preference.
value
)

Set the ViewArea preference.

public void
setViewClip(PDViewerPreferences.BOUNDARY
Set the ViewClip preference.
value
)

Set the ViewClip preference.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

prefsback to summary
private final COSDictionary prefs

Constructor Detail

PDViewerPreferencesback to summary
public PDViewerPreferences()

Constructor.

PDViewerPreferencesback to summary
public PDViewerPreferences(COSDictionary dic)

Constructor that is used for a preexisting dictionary.

Parameters
dic:COSDictionary

The underlying dictionary.

Method Detail

centerWindowback to summary
public boolean centerWindow()

Get the center window preference.

Returns:boolean

the center window preference.

displayDocTitleback to summary
public boolean displayDocTitle()

Get the display doc title preference.

Returns:boolean

the display doc title preference.

fitWindowback to summary
public boolean fitWindow()

Get the fit window preference.

Returns:boolean

the fit window preference.

getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

This will get the underlying dictionary that this object wraps.

Returns:COSDictionary

The underlying info dictionary.

Annotations
@Override
getDuplexback to summary
public String getDuplex()

Get the Duplex preference. See DUPLEX enumeration.

Returns:String

the Duplex preference.

getNonFullScreenPageModeback to summary
public String getNonFullScreenPageMode()

Get the non full screen page mode preference.

Returns:String

the non full screen page mode preference.

getPrintAreaback to summary
public String getPrintArea()

Get the PrintArea preference. See BOUNDARY enumeration.

Returns:String

the PrintArea preference.

getPrintClipback to summary
public String getPrintClip()

Get the PrintClip preference. See BOUNDARY enumeration.

Returns:String

the PrintClip preference.

getPrintScalingback to summary
public String getPrintScaling()

Get the PrintScaling preference. See PRINT_SCALING enumeration.

Returns:String

the PrintScaling preference.

getReadingDirectionback to summary
public String getReadingDirection()

Get the reading direction preference.

Returns:String

the reading direction preference.

getViewAreaback to summary
public String getViewArea()

Get the ViewArea preference. See BOUNDARY enumeration.

Returns:String

the ViewArea preference.

getViewClipback to summary
public String getViewClip()

Get the ViewClip preference. See BOUNDARY enumeration.

Returns:String

the ViewClip preference.

hideMenubarback to summary
public boolean hideMenubar()

Get the menubar preference.

Returns:boolean

the menubar preference.

hideToolbarback to summary
public boolean hideToolbar()

Get the toolbar preference.

Returns:boolean

the toolbar preference.

hideWindowUIback to summary
public boolean hideWindowUI()

Get the window UI preference.

Returns:boolean

the window UI preference.

setCenterWindowback to summary
public void setCenterWindow(boolean value)

Set the center window preference.

Parameters
value:boolean

Set the center window preference.

setDisplayDocTitleback to summary
public void setDisplayDocTitle(boolean value)

Set the display doc title preference.

Parameters
value:boolean

Set the display doc title preference.

setDuplexback to summary
public void setDuplex(PDViewerPreferences.DUPLEX value)

Set the Duplex preference. See DUPLEX enumeration.

Parameters
value:PDViewerPreferences.DUPLEX

Set the Duplex preference.

setFitWindowback to summary
public void setFitWindow(boolean value)

Set the fit window preference.

Parameters
value:boolean

Set the fit window preference.

setHideMenubarback to summary
public void setHideMenubar(boolean value)

Set the menubar preference.

Parameters
value:boolean

Set the menubar preference.

setHideToolbarback to summary
public void setHideToolbar(boolean value)

Set the toolbar preference.

Parameters
value:boolean

Set the toolbar preference.

setHideWindowUIback to summary
public void setHideWindowUI(boolean value)

Set the window UI preference.

Parameters
value:boolean

Set the window UI preference.

setNonFullScreenPageModeback to summary
public void setNonFullScreenPageMode(PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE value)

Set the non full screen page mode preference.

Parameters
value:PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE

Set the non full screen page mode preference.

setPrintAreaback to summary
public void setPrintArea(PDViewerPreferences.BOUNDARY value)

Set the PrintArea preference. See BOUNDARY enumeration.

Parameters
value:PDViewerPreferences.BOUNDARY

Set the PrintArea preference.

setPrintClipback to summary
public void setPrintClip(PDViewerPreferences.BOUNDARY value)

Set the PrintClip preference. See BOUNDARY enumeration.

Parameters
value:PDViewerPreferences.BOUNDARY

Set the PrintClip preference.

setPrintScalingback to summary
public void setPrintScaling(PDViewerPreferences.PRINT_SCALING value)

Set the PrintScaling preference. See PRINT_SCALING enumeration.

Parameters
value:PDViewerPreferences.PRINT_SCALING

Set the PrintScaling preference.

setReadingDirectionback to summary
public void setReadingDirection(PDViewerPreferences.READING_DIRECTION value)

Set the reading direction preference.

Parameters
value:PDViewerPreferences.READING_DIRECTION

Set the reading direction preference.

setViewAreaback to summary
public void setViewArea(PDViewerPreferences.BOUNDARY value)

Set the ViewArea preference. See BOUNDARY enumeration.

Parameters
value:PDViewerPreferences.BOUNDARY

Set the ViewArea preference.

setViewClipback to summary
public void setViewClip(PDViewerPreferences.BOUNDARY value)

Set the ViewClip preference. See BOUNDARY enumeration.

Parameters
value:PDViewerPreferences.BOUNDARY

Set the ViewClip preference.

org.apache.pdfbox.pdmodel.interactive.viewerpreferences back to summary

public final Enum PDViewerPreferences.BOUNDARY

extends Enum<PDViewerPreferences.BOUNDARY>
Class Inheritance

Enumeration containing all valid values for boundaries.

Field Summary

Modifier and TypeField and Description
public static final PDViewerPreferences.BOUNDARY
ArtBox

use art box as boundary.

public static final PDViewerPreferences.BOUNDARY
BleedBox

use bleed box as boundary.

public static final PDViewerPreferences.BOUNDARY
CropBox

use crop box as boundary.

public static final PDViewerPreferences.BOUNDARY
MediaBox

use media box as boundary.

public static final PDViewerPreferences.BOUNDARY
TrimBox

use trim box as boundary.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PDViewerPreferences.BOUNDARY
public static PDViewerPreferences.BOUNDARY[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ArtBoxback to summary
public static final PDViewerPreferences.BOUNDARY ArtBox

use art box as boundary.

BleedBoxback to summary
public static final PDViewerPreferences.BOUNDARY BleedBox

use bleed box as boundary.

CropBoxback to summary
public static final PDViewerPreferences.BOUNDARY CropBox

use crop box as boundary.

MediaBoxback to summary
public static final PDViewerPreferences.BOUNDARY MediaBox

use media box as boundary.

TrimBoxback to summary
public static final PDViewerPreferences.BOUNDARY TrimBox

use trim box as boundary.

Constructor Detail

BOUNDARYback to summary
private BOUNDARY()

Method Detail

valueOfback to summary
public static PDViewerPreferences.BOUNDARY valueOf(String name)
valuesback to summary
public static PDViewerPreferences.BOUNDARY[] values()
org.apache.pdfbox.pdmodel.interactive.viewerpreferences back to summary

public final Enum PDViewerPreferences.DUPLEX

extends Enum<PDViewerPreferences.DUPLEX>
Class Inheritance

Enumeration containing all valid values for duplex.

Field Summary

Modifier and TypeField and Description
public static final PDViewerPreferences.DUPLEX
DuplexFlipLongEdge

duplex printing, flip at long edge.

public static final PDViewerPreferences.DUPLEX
DuplexFlipShortEdge

duplex printing, flip at short edge.

public static final PDViewerPreferences.DUPLEX
Simplex

simplex printing.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PDViewerPreferences.DUPLEX
public static PDViewerPreferences.DUPLEX[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DuplexFlipLongEdgeback to summary
public static final PDViewerPreferences.DUPLEX DuplexFlipLongEdge

duplex printing, flip at long edge.

DuplexFlipShortEdgeback to summary
public static final PDViewerPreferences.DUPLEX DuplexFlipShortEdge

duplex printing, flip at short edge.

Simplexback to summary
public static final PDViewerPreferences.DUPLEX Simplex

simplex printing.

Constructor Detail

DUPLEXback to summary
private DUPLEX()

Method Detail

valueOfback to summary
public static PDViewerPreferences.DUPLEX valueOf(String name)
valuesback to summary
public static PDViewerPreferences.DUPLEX[] values()
org.apache.pdfbox.pdmodel.interactive.viewerpreferences back to summary

public final Enum PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE

extends Enum<PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE>
Class Inheritance

Enumeration containing all valid values for NonFullScreenPageMode.

Field Summary

Modifier and TypeField and Description
public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
UseNone

From PDF Reference: "Neither document outline nor thumbnail images visible".

public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
UseOC

From PDF Reference: "Optional content group panel visible".

public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
UseOutlines

From PDF Reference: "Document outline visible".

public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
UseThumbs

From PDF Reference: "Thumbnail images visible".

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE
public static PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

UseNoneback to summary
public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE UseNone

From PDF Reference: "Neither document outline nor thumbnail images visible".

UseOCback to summary
public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE UseOC

From PDF Reference: "Optional content group panel visible".

UseOutlinesback to summary
public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE UseOutlines

From PDF Reference: "Document outline visible".

UseThumbsback to summary
public static final PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE UseThumbs

From PDF Reference: "Thumbnail images visible".

Constructor Detail

NON_FULL_SCREEN_PAGE_MODEback to summary
private NON_FULL_SCREEN_PAGE_MODE()

Method Detail

valueOfback to summary
public static PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE valueOf(String name)
valuesback to summary
public static PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE[] values()
org.apache.pdfbox.pdmodel.interactive.viewerpreferences back to summary

public final Enum PDViewerPreferences.READING_DIRECTION

extends Enum<PDViewerPreferences.READING_DIRECTION>
Class Inheritance

Enumeration containing all valid values for ReadingDirection.

Field Summary

Modifier and TypeField and Description
public static final PDViewerPreferences.READING_DIRECTION
L2R

left to right.

public static final PDViewerPreferences.READING_DIRECTION
R2L

right to left.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PDViewerPreferences.READING_DIRECTION
public static PDViewerPreferences.READING_DIRECTION[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

L2Rback to summary
public static final PDViewerPreferences.READING_DIRECTION L2R

left to right.

R2Lback to summary
public static final PDViewerPreferences.READING_DIRECTION R2L

right to left.

Constructor Detail

READING_DIRECTIONback to summary
private READING_DIRECTION()

Method Detail

valueOfback to summary
public static PDViewerPreferences.READING_DIRECTION valueOf(String name)
valuesback to summary
public static PDViewerPreferences.READING_DIRECTION[] values()