java.lang.Object
org.sejda.impl.sambox.util.ViewerPreferencesUtils
Utility methods related to the viewer preferences functionalities.
- Author:
- Andrea Vacondio
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.READING_DIRECTIONgetDirection(PdfDirection direction) Mapping between Sejda and PDFBox direction constants.static org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.DUPLEXMapping between Sejda and PDFBox duplex constantsstatic org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODEgetNFSMode(PdfNonFullScreenPageMode nfsMode) Mapping between Sejda and PDFBox non full screen mode constantsstatic org.sejda.sambox.pdmodel.PageLayoutgetPageLayout(PdfPageLayout layout) Mapping between Sejda and PDFBox page layout constants.static org.sejda.sambox.pdmodel.PageModegetPageMode(PdfPageMode mode) Mapping between Sejda and PDFBox page mode constants.static org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.PRINT_SCALINGgetPrintScaling(PdfPrintScaling scaling) Mapping between Sejda and PDFBox print scaling constantsstatic voidsetBooleanPreferences(org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled) Enables the given set of boolean preferences on the given preferences instance and disables the others.
-
Method Details
-
getNFSMode
public static org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE getNFSMode(PdfNonFullScreenPageMode nfsMode) Mapping between Sejda and PDFBox non full screen mode constants- Parameters:
nfsMode-- Returns:
- the PDFBox non full screen mode constant.
-
getPageMode
Mapping between Sejda and PDFBox page mode constants.- Parameters:
mode-- Returns:
- the PDFBox page mode String constant.
-
getPageLayout
Mapping between Sejda and PDFBox page layout constants.- Parameters:
layout-- Returns:
- the PDFBox page layout String constant.
-
getDirection
public static org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.READING_DIRECTION getDirection(PdfDirection direction) Mapping between Sejda and PDFBox direction constants.- Parameters:
direction-- Returns:
- the PDFBox direction constant
-
getDuplex
public static org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.DUPLEX getDuplex(PdfDuplex duplex) Mapping between Sejda and PDFBox duplex constants- Parameters:
duplex-- Returns:
- the PDFBox duplex constant
-
getPrintScaling
public static org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.PRINT_SCALING getPrintScaling(PdfPrintScaling scaling) Mapping between Sejda and PDFBox print scaling constants- Parameters:
scaling-- Returns:
- the PDFBox print scaling constant
-
setBooleanPreferences
public static void setBooleanPreferences(org.sejda.sambox.pdmodel.interactive.viewerpreferences.PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled) throws TaskException Enables the given set of boolean preferences on the given preferences instance and disables the others.- Parameters:
preferences-enabled-- Throws:
TaskException- if the given preferences instance is null.
-