org.sejda.impl.itext.util
Class ViewerPreferencesUtils

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

public final class ViewerPreferencesUtils
extends Object

Utility methods related to the viewer preferences functionalities.

Author:
Andrea Vacondio

Method Summary
static com.lowagie.text.pdf.PdfName getBooleanPreference(PdfBooleanPreference booleanPref)
          Mapping between Sejda and iText boolean preferences constants
static com.lowagie.text.pdf.PdfName getDirection(PdfDirection direction)
          Mapping between Sejda and iText direction constants
static com.lowagie.text.pdf.PdfName getDuplex(PdfDuplex duplex)
          Mapping between Sejda and iText duplex constants
static com.lowagie.text.pdf.PdfName getNFSMode(PdfNonFullScreenPageMode nfsMode)
          Mapping between Sejda and iText non full screen mode constants
static int getPageLayout(PdfPageLayout layout)
          Mapping between Sejda and iText page layout constants
static int getPageMode(PdfPageMode mode)
          Mapping between Sejda and iText page mode constants
static com.lowagie.text.pdf.PdfName getPrintScaling(PdfPrintScaling scaling)
          Mapping between Sejda and iText print scaling constants
static int getViewerPreferences(PdfPageMode mode, PdfPageLayout layout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDirection

public static com.lowagie.text.pdf.PdfName getDirection(PdfDirection direction)
Mapping between Sejda and iText direction constants

Parameters:
direction -
Returns:
the iText direction constant

getPrintScaling

public static com.lowagie.text.pdf.PdfName getPrintScaling(PdfPrintScaling scaling)
Mapping between Sejda and iText print scaling constants

Parameters:
scaling -
Returns:
the iText print scaling constant

getDuplex

public static com.lowagie.text.pdf.PdfName getDuplex(PdfDuplex duplex)
Mapping between Sejda and iText duplex constants

Parameters:
duplex -
Returns:
the iText duplex constant

getNFSMode

public static com.lowagie.text.pdf.PdfName getNFSMode(PdfNonFullScreenPageMode nfsMode)
Mapping between Sejda and iText non full screen mode constants

Parameters:
nfsMode -
Returns:
the iText non full screen mode constant

getBooleanPreference

public static com.lowagie.text.pdf.PdfName getBooleanPreference(PdfBooleanPreference booleanPref)
Mapping between Sejda and iText boolean preferences constants

Parameters:
booleanPref -
Returns:
the iText boolean preferences constant

getPageMode

public static int getPageMode(PdfPageMode mode)
Mapping between Sejda and iText page mode constants

Parameters:
mode -
Returns:
the iText page mode int

getPageLayout

public static int getPageLayout(PdfPageLayout layout)
Mapping between Sejda and iText page layout constants

Parameters:
layout -
Returns:
the iText page layout int

getViewerPreferences

public static int getViewerPreferences(PdfPageMode mode,
                                       PdfPageLayout layout)
Parameters:
mode -
layout -
Returns:
the int representing the ORed layout|mode that can be used to set the viewer preferences in the pdf stamper.


Copyright © 2013 sejda. All Rights Reserved.