Class IDRViewerOptions
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enum for setting which viewer user interface to use (Complete, Clean, Simple, SlideShow, Custom). -
Constructor Summary
ConstructorDescriptionIDRViewerOptions
(String options) IDRViewerOptions
(Map<String, String> jvmOptions) -
Method Summary
Modifier and TypeMethodDescriptionsetEnableLaunchActions
(boolean value) Enables Link annotations that use Launch actions in the IDRViewer.setGenerateSearchFile
(boolean value) Generates search.json.setOutputThumbnails
(boolean value) Output thumbnails of pages in /thumbnails/.setThumbnailMaxHeight
(int value) Sets the maximum height of the thumbnails.setThumbnailMaxWidth
(int value) Sets the maximum width of the thumbnails.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
-D
org.jpedal.pdf2html.viewerUI
=- Parameters:
viewerUI
- The ViewerUI to use.- Returns:
- the IDRViewerOptions Object.
-
setEnableLaunchActions
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
-D
org.jpedal.pdf2html.enableLaunchActions
=- Parameters:
value
- is of type boolean.- Returns:
- the IDRViewerOptions Object.
- Since:
- 2021.05
-
setGenerateSearchFile
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
-D
org.jpedal.pdf2html.generateSearchFile
=- Overrides:
setGenerateSearchFile
in classOutputModeOptions
- Parameters:
value
- is of type boolean.- Returns:
- the OutputModeOptions object.
-
setOutputThumbnails
Output thumbnails of pages in /thumbnails/.Possible value:
- true/false
Default: false
Thumbnails are always generated if using the IDRViewer with ViewerUI Complete.
Also set with
-D
org.jpedal.pdf2html.outputThumbnails
=- Overrides:
setOutputThumbnails
in classOutputModeOptions
- Parameters:
value
- is of type boolean.- Returns:
- the OutputModeOptions Object.
-
setThumbnailMaxWidth
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
-D
org.jpedal.pdf2html.thumbnailMaxWidth
=- Overrides:
setThumbnailMaxWidth
in classOutputModeOptions
- Parameters:
value
- the maximum thumbnail width- Returns:
- the OutputModeOptions object.
-
setThumbnailMaxHeight
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
-D
org.jpedal.pdf2html.thumbnailMaxHeight
=- Overrides:
setThumbnailMaxHeight
in classOutputModeOptions
- Parameters:
value
- the maximum thumbnail height- Returns:
- the OutputModeOptions object.
-