org.sejda.impl.pdfbox.util
Class ViewerPreferencesUtils

java.lang.Object
  extended by org.sejda.impl.pdfbox.util.ViewerPreferencesUtils

public final class ViewerPreferencesUtils
extends Object

Utility methods related to the viewer preferences functionalities.

Author:
Andrea Vacondio

Method Summary
static org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.READING_DIRECTION getDirection(PdfDirection direction)
          Mapping between Sejda and PDFBox direction constants.
static org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.DUPLEX getDuplex(PdfDuplex duplex)
          Mapping between Sejda and PDFBox duplex constants
static org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE getNFSMode(PdfNonFullScreenPageMode nfsMode)
          Mapping between Sejda and PDFBox non full screen mode constants
static String getPageLayout(PdfPageLayout layout)
          Mapping between Sejda and PDFBox page layout constants.
static String getPageMode(PdfPageMode mode)
          Mapping between Sejda and PDFBox page mode constants.
static org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.PRINT_SCALING getPrintScaling(PdfPrintScaling scaling)
          Mapping between Sejda and PDFBox print scaling constants
static void setBooleanPreferences(org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences preferences, Set<PdfBooleanPreference> enabled)
          Enables the given set of boolean preferences on the given preferences instance and disables the others.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNFSMode

public static org.apache.pdfbox.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

public static String getPageMode(PdfPageMode mode)
Mapping between Sejda and PDFBox page mode constants.

Parameters:
mode -
Returns:
the PDFBox page mode String constant.

getPageLayout

public static String getPageLayout(PdfPageLayout layout)
Mapping between Sejda and PDFBox page layout constants.

Parameters:
layout -
Returns:
the PDFBox page layout String constant.

getDirection

public static org.apache.pdfbox.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.apache.pdfbox.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.apache.pdfbox.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.apache.pdfbox.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.


Copyright © 2012. All Rights Reserved.