Class IDRViewerOptions

java.lang.Object
org.jpedal.render.output.OutputModeOptions
org.jpedal.render.output.IDRViewerOptions

public class IDRViewerOptions extends OutputModeOptions
The class to use for setting output options when using the IDRViewer.
  • Constructor Details

    • IDRViewerOptions

      public IDRViewerOptions(Map<String,String> jvmOptions)
    • IDRViewerOptions

      public IDRViewerOptions()
    • IDRViewerOptions

      public IDRViewerOptions(String options)
  • Method Details

    • setViewerUI

      public void setViewerUI(IDRViewerOptions.ViewerUI viewerUI)
      Sets the user interface to use for the viewer.

      Complete provides a fully featured viewer with bookmarks and thumbnail navigation.

      Clean provides a cleanly styled user interface.

      Simple provides a minimal, simple user interface.

      SlideShow provides a slideshow presentation style user interface with fullscreen functionality.

      Custom will not output an index.html file and can be used if you wish to use your own index file.

      Possible values:

      • complete
      • clean
      • simple
      • slideshow
      • custom
      Default: complete

      Also set in the JVM options with -Dorg.jpedal.pdf2html.viewerUI=

      Parameters:
      viewerUI - The ViewerUI to use.
    • setEnableLaunchActions

      public void setEnableLaunchActions(boolean value)
      Enables Link annotations that use Launch actions in the IDRViewer. In PDF files, this type of annotation is most commonly used for opening another document using a relative path to the local filesystem. This places a dependency on the platform as it requires the document to exist at the given location. This may work in the browser, but requires special attention to ensure the linked document exists at the expected location. For this reason, the IDRViewer defaults to ignoring this type of annotation to avoid 404 not found errors.

      In PDF files, Launch actions can also be used to launch other arbitrary applications (e.g. calc.exe). The IDRViewer does not include any functionality to differentiate between Launch actions intended to open a file and those intended to launch another application. In both cases, the IDRViewer will open a new tab as if given a location relative to the current location.

      Possible value:

      • true/false

      Default: false Also set with -Dorg.jpedal.pdf2html.enableLaunchActions=

      Parameters:
      value - is of type boolean.
    • setGenerateSearchFile

      public void setGenerateSearchFile(boolean value)
      Generates search.json. This file contains an array (one element per page) containing the textual content from each page. It is used by idrviewer.search.js for page search.

      search.json is always generated in the IDRViewer Complete UI. Search is not supported as standard in other IDRViewer UI modes.

      Possible value:

      • true/false

      Also set with -Dorg.jpedal.pdf2html.generateSearchFile=

      Overrides:
      setGenerateSearchFile in class OutputModeOptions
      Parameters:
      value - is of type boolean.
    • setOutputThumbnails

      public void setOutputThumbnails(boolean value)
      Output thumbnails of pages in /thumbnails/.

      Possible value:

      • true/false

      Default: false

      Thumnails are always generated if using the IDRViewer with ViewerUI Complete.

      Also set with -Dorg.jpedal.pdf2html.outputThumbnails=

      Overrides:
      setOutputThumbnails in class OutputModeOptions
      Parameters:
      value - is of type boolean.
    • setThumbnailMaxWidth

      public void setThumbnailMaxWidth(int value)
      Sets the maximum width of the thumbnails. Can be used in conjunction with setThumbnailMaxHeight. If both a width and height are given then the generated thumbnails will fit within the bounds given, maintaining the aspect ratio of the original page. If only a width or height is given then the size of the generated thumbnails will match the bound given, again maintaining the aspect ratio of the original page.

      Possible values:

      • Any positive integer
      Also set with -Dorg.jpedal.pdf2html.thumbnailMaxWidth=
      Overrides:
      setThumbnailMaxWidth in class OutputModeOptions
      Parameters:
      value - the maximum thumbnail width
    • setThumbnailMaxHeight

      public void setThumbnailMaxHeight(int value)
      Sets the maximum height of the thumbnails. Can be used in conjunction with setThumbnailMaxWidth. If both a width and height are given then the generated thumbnails will fit within the bounds given, maintaining the aspect ratio of the original page. If only a width or height is given then the size of the generated thumbnails will match the bound given, again maintaining the aspect ratio of the original page.

      Possible values:

      • Any positive integer
      Also set with -Dorg.jpedal.pdf2html.thumbnailMaxHeight=
      Overrides:
      setThumbnailMaxHeight in class OutputModeOptions
      Parameters:
      value - the maximum thumbnail height