Class FormViewerOptions
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enum for setting the content mode to use (NO_FDFXFADUMP, NO_MENU, REDUCED_CONTENT, DEFAULT). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
setDecoupleEmptyValues
(boolean value) Only active whendecoupleFormData
is true, this setting allows you to populateformdata.json
with all fields present in the PDF, including entries that have default/empty valuessetDecoupleFormData
(boolean value) Update the conversion so that existing form field values that have been set in the PDF are not output in HTML fields.setEnableAcroFormJS
(boolean value) Enable JavaScript from the AcroForm PDF to be included in the conversion output.setEnableFDFJavaScript
(boolean value) Deprecated.Replaced with setEnableAcroFormJS(final boolean value)Set a color represented by hex format to be used as a background to highlight form fields.Set a color represented by hex format to be used to outline to highlight form fields.setGenerateSearchFile
(boolean value) Generates search.json.setInlineJavaScriptAndCSS
(boolean value) Inline JavaScript and CSS within HTML.setNoCheckboxOrRadioButtonImages
(boolean value) Do not use the on/off images from the converted PDF for checkboxes/radio buttons.setOutputContentMode
(FormViewerOptions.OutputContentMode outputContentMode) The output content mode affects what content is included in the generated output.setOutputThumbnails
(boolean value) Output thumbnails of pages in /thumbnails/.setSubmitUrl
(String value) Set the default pdf form submission URLsetThumbnailMaxHeight
(int value) Sets the maximum height of the thumbnails.setThumbnailMaxWidth
(int value) Sets the maximum width of the thumbnails.setUseFormVuAPI
(boolean value) Output the formvuapi.js file, which handles custom functionality such as submitting forms as JSON.Methods inherited from class org.jpedal.render.output.OutputModeOptions
getBooleanValue, getErrors, getStringValue
-
Constructor Details
-
FormViewerOptions
-
FormViewerOptions
public FormViewerOptions()
-
-
Method Details
-
setSubmitUrl
Set the default pdf form submission URLPlease Note: once the user click submit button the filled pdf form will be posted to server as base64 String with the parameter name "pdfdata"
Possible values:
- https://form.submission.com/
Default: none
Also set with
-D
org.jpedal.pdf2html.submitUrl
=- Parameters:
value
- is of type String.- Returns:
- the FormViewerOptions Object.
-
setInlineJavaScriptAndCSS
Inline JavaScript and CSS within HTML.This inlines the JavaScript into <\script> tags and CSS into <\style> within HTML so that there are no separate .js/.css files.
Possible values:
- true/false
Default: false
Also set with
-D
org.jpedal.pdf2html.inlineJavaScriptAndCSS
=- Parameters:
value
- Boolean true/false.- Returns:
- the FormViewerOptions Object.
-
setEnableFDFJavaScript
Deprecated.Replaced with setEnableAcroFormJS(final boolean value)Function has been renamed to setEnableAcroFormJS- Parameters:
value
- Boolean true/false.- Returns:
- the FormViewerOptions Object.
-
setEnableAcroFormJS
Enable JavaScript from the AcroForm PDF to be included in the conversion output.JavaScript functionality must already be present in the PDF.
Possible values:
- true/false
Default: false
Also set with
-D
org.jpedal.pdf2html.enableAcroFormJS
=- Parameters:
value
- Boolean true/false.- Returns:
- the FormViewerOptions Object.
-
setNoCheckboxOrRadioButtonImages
Do not use the on/off images from the converted PDF for checkboxes/radio buttons.Uses the HTML <input> implementations instead.
Possible values:
- true/false
Default: false
Also set with
-D
org.jpedal.pdf2html.noCheckboxOrRadioButtonImages
=- Parameters:
value
- Boolean true/false.- Returns:
- the FormViewerOptions Object.
-
setOutputContentMode
public FormViewerOptions setOutputContentMode(FormViewerOptions.OutputContentMode outputContentMode) The output content mode affects what content is included in the generated output. This can be used to reduce unwanted content.Important : When using NO_FDFXFADUMP or REDUCED_CONTENT you will lose the functionality of submitting data and saving data back to a PDF for acroform PDFs. If you intend to use these features do not use these modes.
NO_MENU can be beneficial for users who do not want to use the provided menu for any converted form files.
Possible values:
- DEFAULT - No changes to the output
- NO_FDFXFADUMP - Disable the FDFXFA_DUMP div from the output
- NO_MENU - Disable the FDFXFA_MENU div from the output
- REDUCED_CONTENT - Disable both FDFXFA_DUMP, FDFXFA_MENU from the output
Also set in the JVM options with
-D
org.jpedal.pdf2html.outputContentMode
=- Parameters:
outputContentMode
- - The content mode for the desired output.- Returns:
- the FormViewerOptions Object.
-
setUseFormVuAPI
Output the formvuapi.js file, which handles custom functionality such as submitting forms as JSON.Possible values:
- true/false
Default: true
Also set with
-D
org.jpedal.pdf2html.useFormVuAPI
=- Parameters:
value
- Boolean true/false.- Returns:
- the FormViewerOptions Object.
-
setFormFieldBorderHighlight
Set a color represented by hex format to be used to outline to highlight form fields.When This value isn't set, outline highlights will not be added.
Example values:
- #FF0000, #F6a4bb, a0000b
Default: unset
Also set with
-D
org.jpedal.pdf2html.formFieldBorderHighlight
=- Parameters:
value
- String Hex Colour.- Returns:
- the FormViewerOptions Object.
-
setFormFieldBackgroundHighlight
Set a color represented by hex format to be used as a background to highlight form fields.When This value isn't set, background highlights will not be added.
Example values:
- #FF0000, #F6a4bb, a0000b
Default: unset
Also set with
-D
org.jpedal.pdf2html.formFieldBackgroundHighlight
=- Parameters:
value
- String Hex Colour.- Returns:
- the FormViewerOptions Object.
-
getInlineJavaScriptAndCSS
public boolean getInlineJavaScriptAndCSS() -
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.
-
setDecoupleFormData
Update the conversion so that existing form field values that have been set in the PDF are not output in HTML fields. Instead, output these values into a JSON file (formdata.json).
By default, this will only output the fields that do not have empty/default values. This behaviour can be changed with thedecoupleEmptyValues
setting.
In order to have the desired effect, this setting will also not output the AP images of readonly text fieldsPossible values:
- true/false
Default: false
Also set with
-D
org.jpedal.pdf2html.decoupleFormData
=- Parameters:
value
- Boolean true/false.- Returns:
- the FormViewerOptions Object.
- See Also:
-
setDecoupleEmptyValues
Only active whendecoupleFormData
is true, this setting allows you to populateformdata.json
with all fields present in the PDF, including entries that have default/empty valuesPossible values:
- true/false
Default: false
Also set with
-D
org.jpedal.pdf2html.decoupleEmptyValues
=- Parameters:
value
- Boolean true/false.- Returns:
- the FormViewerOptions Object.
- See Also:
-