- java.lang.Object
-
- com.itextpdf.text.pdf.internal.PdfViewerPreferencesImp
-
- All Implemented Interfaces:
PdfViewerPreferences
public class PdfViewerPreferencesImp extends java.lang.Object implements PdfViewerPreferences
Stores the information concerning viewer preferences, and contains the business logic that allows you to set viewer preferences.
-
-
Field Summary
Fields Modifier and Type Field Description static PdfName[]DIRECTION_PREFERENCESA series of viewer preferences.static PdfName[]DUPLEX_PREFERENCESA series of viewer preferences.static PdfName[]NONFULLSCREENPAGEMODE_PREFERENCESA series of viewer preferences.static PdfName[]PAGE_BOUNDARIESA series of viewer preferences.static PdfName[]PRINTSCALING_PREFERENCESA series of viewer preferencesstatic PdfName[]VIEWER_PREFERENCES
-
Constructor Summary
Constructors Constructor Description PdfViewerPreferencesImp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToCatalog(PdfDictionary catalog)Adds the viewer preferences defined in the preferences parameter to a PdfDictionary (more specifically the root or catalog of a PDF file).voidaddViewerPreference(PdfName key, PdfObject value)Sets the viewer preferences for printing.intgetPageLayoutAndMode()Returns the page layout and page mode value.PdfDictionarygetViewerPreferences()Returns the viewer preferences.static PdfViewerPreferencesImpgetViewerPreferences(PdfDictionary catalog)voidsetViewerPreferences(int preferences)Sets the viewer preferences as the sum of several constants.
-
-
-
Field Detail
-
VIEWER_PREFERENCES
public static final PdfName[] VIEWER_PREFERENCES
-
NONFULLSCREENPAGEMODE_PREFERENCES
public static final PdfName[] NONFULLSCREENPAGEMODE_PREFERENCES
A series of viewer preferences.
-
DIRECTION_PREFERENCES
public static final PdfName[] DIRECTION_PREFERENCES
A series of viewer preferences.
-
PAGE_BOUNDARIES
public static final PdfName[] PAGE_BOUNDARIES
A series of viewer preferences.
-
PRINTSCALING_PREFERENCES
public static final PdfName[] PRINTSCALING_PREFERENCES
A series of viewer preferences
-
DUPLEX_PREFERENCES
public static final PdfName[] DUPLEX_PREFERENCES
A series of viewer preferences.
-
-
Method Detail
-
getPageLayoutAndMode
public int getPageLayoutAndMode()
Returns the page layout and page mode value.
-
getViewerPreferences
public PdfDictionary getViewerPreferences()
Returns the viewer preferences.
-
setViewerPreferences
public void setViewerPreferences(int preferences)
Sets the viewer preferences as the sum of several constants.- Specified by:
setViewerPreferencesin interfacePdfViewerPreferences- Parameters:
preferences- the viewer preferences- See Also:
PdfViewerPreferences.setViewerPreferences(int)
-
addViewerPreference
public void addViewerPreference(PdfName key, PdfObject value)
Sets the viewer preferences for printing.- Specified by:
addViewerPreferencein interfacePdfViewerPreferences- Parameters:
key- the name of the viewer preferencevalue- the value of the viewer preference- See Also:
PdfViewerPreferences.setViewerPreferences(int)
-
addToCatalog
public void addToCatalog(PdfDictionary catalog)
Adds the viewer preferences defined in the preferences parameter to a PdfDictionary (more specifically the root or catalog of a PDF file).- Parameters:
catalog-
-
getViewerPreferences
public static PdfViewerPreferencesImp getViewerPreferences(PdfDictionary catalog)
-
-