Class IDRViewerOptions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum for setting which viewer user interface to use (Complete, Clean, Simple, SlideShow, Custom). -
Constructor Summary
ConstructorsConstructorDescriptionIDRViewerOptions
(String options) IDRViewerOptions
(Map<String, String> jvmOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
setEnableLaunchActions
(boolean value) Enables Link annotations that use Launch actions in the IDRViewer.void
setGenerateSearchFile
(boolean value) Generates search.json.void
setOutputThumbnails
(boolean value) Output thumbnails of pages in /thumbnails/.void
setThumbnailMaxHeight
(int value) Sets the maximum height of the thumbnails.void
setThumbnailMaxWidth
(int value) Sets the maximum width of the thumbnails.void
setViewerUI
(IDRViewerOptions.ViewerUI viewerUI) Sets the user interface to use for the viewer.Methods inherited from class org.jpedal.render.output.OutputModeOptions
getBooleanValue, getErrors, getStringValue
-
Constructor Details
-
IDRViewerOptions
-
IDRViewerOptions
public IDRViewerOptions() -
IDRViewerOptions
-
-
Method Details
-
setViewerUI
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
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 classOutputModeOptions
- 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 classOutputModeOptions
- 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
- Overrides:
setThumbnailMaxWidth
in classOutputModeOptions
- 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
- Overrides:
setThumbnailMaxHeight
in classOutputModeOptions
- Parameters:
value
- the maximum thumbnail height
-