Class ContentOptions
-
Constructor Summary
ConstructorDescriptionContentOptions
(String options) ContentOptions
(Map<String, String> jvmOptions) -
Method Summary
Modifier and TypeMethodDescriptionsetCompleteDocument
(boolean value) Enabling this setting will output html, head and body tags.setContainerId
(String value) Set the id to use for the page container div.setCssSuffix
(String cssSuffix) Appends the provided cssSuffix value to any classes and IDs within the document.setFirstPageName
(String value) Deprecated.We do not recommend that this option be used.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.Methods inherited from class org.jpedal.render.output.OutputModeOptions
getBooleanValue, getErrors, getStringValue
-
Constructor Details
-
ContentOptions
-
ContentOptions
public ContentOptions() -
ContentOptions
-
-
Method Details
-
setCompleteDocument
Enabling this setting will output html, head and body tags.This mode is recommended if content will be displayed within iframes.
This setting has no behavior in SVG conversion.
Possible value:
- true/false
Default: false
Also set with
-D
org.jpedal.pdf2html.completeDocument
=- Parameters:
value
- is of type boolean- Returns:
- the ContentOptions Object
-
setFirstPageName
Deprecated.We do not recommend that this option be used.Allows filename of the first page to be changed.Also set with
-D
org.jpedal.pdf2html.firstPageName
=- Parameters:
value
- is of type String- Returns:
- the ContentOptions 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.
-
setContainerId
Set the id to use for the page container div.Default: jpedal
Also set with
-D
org.jpedal.pdf2html.containerId
=- Parameters:
value
- is of type String- Returns:
- the ContentOptions Object.
-
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.
-
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.
-
setCssSuffix
Appends the provided cssSuffix value to any classes and IDs within the document.This allows you to prevent style conflicts when displaying multiple conversions within the same browsing context. For example, the selector for the first text style class on page 1 of a document would normally be `.s1_1`. However, setting a cssSuffix of `doc1` would change the selector to `.s1_1_doc1`.
We recommend keeping the cssSuffix value short to prevent unnecessarily increasing the output filesize.
Possible values:
- Any string containing only characters [a-zA-Z0-9], hyphen (-) or underscore(_).
Default: empty string
Also set with
-D
org.jpedal.pdf2html.cssSuffix
=- Parameters:
cssSuffix
- the suffix to be added to all CSS names and identifiers- Returns:
- the ConversionOptions Object.
- Since:
- 2024.11
-