Class ViewerPreferences

java.lang.Object
org.jpedal.constants.ViewerPreferences

public final class ViewerPreferences extends Object
PDF Viewer Preferences.

Each property corresponds to the PDF specification fields.

  • Constructor Details

    • ViewerPreferences

      public ViewerPreferences()
  • Method Details

    • isHideToolbar

      public boolean isHideToolbar()
      A flag specifying whether to hide the interactive PDF processor’s tool bars when the document is active. Default value: false.
    • setHideToolbar

      public void setHideToolbar(boolean hideToolbar)
      Set the hideToolbar value.
      Parameters:
      hideToolbar - the value to set
    • isHideMenubar

      public boolean isHideMenubar()
      A flag specifying whether to hide the interactive PDF processor’s menu bar when the document is active. Default value: false.
    • setHideMenubar

      public void setHideMenubar(boolean hideMenubar)
      Set the hideMenubar value.
      Parameters:
      hideMenubar - the value to set
    • isHideWindowUI

      public boolean isHideWindowUI()
      A flag specifying whether to hide user interface elements in the document’s window (such as scroll bars and navigation controls), leaving only the document’s contents displayed. Default value: false.
    • setHideWindowUI

      public void setHideWindowUI(boolean hideWindowUI)
      Set the hideWindowUI value.
      Parameters:
      hideWindowUI - the value to set
    • isFitWindow

      public boolean isFitWindow()
      A flag specifying whether to resize the document’s window to fit the size of the first displayed page. Default value: false.
    • setFitWindow

      public void setFitWindow(boolean fitWindow)
      Set the fitWindow value.
      Parameters:
      fitWindow - the value to set
    • isCenterWindow

      public boolean isCenterWindow()
      A flag specifying whether to position the document’s window in the centre of the screen. Default value: false.
    • setCenterWindow

      public void setCenterWindow(boolean centerWindow)
      Set the centerWindow value.
      Parameters:
      centerWindow - the value to set
    • isDisplayDocTitle

      public boolean isDisplayDocTitle()
      A flag specifying whether the window’s title bar should display the document title taken from the XMP metadata stream. If false, the title bar displays the file name. Default value: false.
    • setDisplayDocTitle

      public void setDisplayDocTitle(boolean displayDocTitle)
      Set the displayDocTitle value.
      Parameters:
      displayDocTitle - the value to set
    • getNonFullScreenPageMode

      public PageMode getNonFullScreenPageMode()
      The document’s page mode when exiting full-screen mode. A value of PageMode.FULL_SCREEN is invalid. Default value: PageMode.USE_NONE.
    • setNonFullScreenPageMode

      public void setNonFullScreenPageMode(PageMode nonFullScreenPageMode)
      Set the nonFullScreenPageMode value. A value of PageMode.FULL_SCREEN is invalid.
      Parameters:
      nonFullScreenPageMode - the value to set
    • getDirection

      public ViewerPreferences.Direction getDirection()
      The predominant logical content order for text. Default value: ViewerPreferences.Direction.L2R.
    • setDirection

      public void setDirection(ViewerPreferences.Direction direction)
      Set the direction value.
      Parameters:
      direction - the value to set
    • getViewArea

      public ViewerPreferences.PageBoundary getViewArea()
      The page boundary representing the area of a page displayed when viewing on screen. Default value: ViewerPreferences.PageBoundary.CROP_BOX.

      Deprecated in PDF 2.0.

    • setViewArea

      public void setViewArea(ViewerPreferences.PageBoundary viewArea)
      Set the viewArea value.
      Parameters:
      viewArea - the value to set
    • getViewClip

      public ViewerPreferences.PageBoundary getViewClip()
      The page boundary to which the contents of a page shall be clipped when viewing on screen. Default value: ViewerPreferences.PageBoundary.CROP_BOX.

      Deprecated in PDF 2.0.

    • setViewClip

      public void setViewClip(ViewerPreferences.PageBoundary viewClip)
      Set the viewClip value.
      Parameters:
      viewClip - the value to set
    • getPrintArea

      public ViewerPreferences.PageBoundary getPrintArea()
      The page boundary representing the area of a page rendered when printing. Default value: ViewerPreferences.PageBoundary.CROP_BOX.

      Deprecated in PDF 2.0.

    • setPrintArea

      public void setPrintArea(ViewerPreferences.PageBoundary printArea)
      Set the printArea value.
      Parameters:
      printArea - the value to set
    • getPrintClip

      public ViewerPreferences.PageBoundary getPrintClip()
      The page boundary to which the contents of a page shall be clipped when printing. Default value: ViewerPreferences.PageBoundary.CROP_BOX.

      Deprecated in PDF 2.0.

    • setPrintClip

      public void setPrintClip(ViewerPreferences.PageBoundary printClip)
      Set the printClip value.
      Parameters:
      printClip - the value to set
    • getPrintScaling

      public ViewerPreferences.PrintScaling getPrintScaling()
      The page scaling option used in print dialogue. Default value: ViewerPreferences.PrintScaling.APP_DEFAULT.
    • setPrintScaling

      public void setPrintScaling(ViewerPreferences.PrintScaling printScaling)
      Set the printScaling value.
      Parameters:
      printScaling - the value to set
    • getDuplex

      public ViewerPreferences.Duplex getDuplex()
      The duplex option when printing the PDF. Default value: implementation dependent.
    • setDuplex

      public void setDuplex(ViewerPreferences.Duplex duplex)
      Set the duplex value.
      Parameters:
      duplex - the value to set
    • isPickTrayByPDFSize

      public boolean isPickTrayByPDFSize()
      A flag specifying whether the PDF page size is used to select the input paper tray. Default value: implementation dependent.
    • setPickTrayByPDFSize

      public void setPickTrayByPDFSize(boolean pickTrayByPDFSize)
      Set the pickTrayByPDFSize value.
      Parameters:
      pickTrayByPDFSize - the value to set.
    • getPrintPageRange

      public int[] getPrintPageRange()
      The page ranges used to initialize the print dialogue box when printing. Represented as an array of integers in pairs [startPage, endPage]. Default value: implementation dependent.
    • setPrintPageRange

      public void setPrintPageRange(int[] printPageRange)
    • getNumCopies

      public int getNumCopies()
      The number of copies to be printed when the print dialogue is opened. Default value: implementation dependent (typically 1).
    • setNumCopies

      public void setNumCopies(int numCopies)
      Set the numCopies value.
      Parameters:
      numCopies - the value to set
    • getEnforce

      public String[] getEnforce()
      An array of names of viewer preference settings that shall be enforced by PDF processors and not overridden by user interface selections.
    • setEnforce

      public void setEnforce(String[] enforce)
      Set the enforce value. Names must NOT be preceded with a solidus (forward-slash)
      Parameters:
      enforce - the value to set