Microservice Settings
The FormVu Microservice has a number of settings that can be applied to grant better control of your conversion. These settings are detailed below.
Available Settings
- org.jpedal.pdf2html.addJavaScript
- org.jpedal.pdf2html.clipOffsetAmount
- org.jpedal.pdf2html.compressImages
- org.jpedal.pdf2html.compressSVG
- org.jpedal.pdf2html.containerId
- org.jpedal.pdf2html.convertPDFExternalFileToOutputType
- org.jpedal.pdf2html.convertSpacesToNbsp
- org.jpedal.pdf2html.decoupleEmptyValues
- org.jpedal.pdf2html.decoupleFormData
- org.jpedal.pdf2html.disableComments
- org.jpedal.pdf2html.disableLinkGeneration
- org.jpedal.pdf2html.embedImagesAsBase64Stream
- org.jpedal.pdf2html.enableAcroFormJS
- org.jpedal.pdf2html.formFieldBackgroundHighlight
- org.jpedal.pdf2html.formFieldBorderHighlight
- org.jpedal.pdf2html.fontsToRasterizeInTextMode
- org.jpedal.pdf2html.formTag
- org.jpedal.pdf2html.generateSearchFile
- org.jpedal.pdf2html.imageScale
- org.jpedal.pdf2html.includedFonts
- org.jpedal.pdf2html.inlineJavaScriptAndCSS
- org.jpedal.pdf2html.inlineSVG
- org.jpedal.pdf2html.keepGlyfsSeparate
- org.jpedal.pdf2html.logicalPageRange
- org.jpedal.pdf2html.maxPageHeight
- org.jpedal.pdf2html.maxPageWidth
- org.jpedal.pdf2html.noCheckboxOrRadioButtonImages
- org.jpedal.pdf2html.outputContentMode
- org.jpedal.pdf2html.outputThumbnails
- org.jpedal.pdf2html.password
- org.jpedal.pdf2html.pixelsPerInch
- org.jpedal.pdf2html.realPageRange
- org.jpedal.pdf2html.scaling
- org.jpedal.pdf2html.separateTextToWords
- org.jpedal.pdf2html.submitUrl
- org.jpedal.pdf2html.tinyTextRemovalThreshold
- org.jpedal.pdf2html.textMode
- org.jpedal.pdf2html.useDRFormFonts
- org.jpedal.pdf2html.useFormVuAPI
- org.jpedal.pdf2html.useLegacyImageFileType
org.jpedal.pdf2html.addJavaScript
Include all the JavaScript that is within the PDF file.
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.clipOffsetAmount
Set the distance in pixels that polygons are expanded by in order to reduce fractional white lines that can appear in converted content. A value of 0
will disable this feature.
Required? No
Accepted Values
- Float value greater than or equal to
0
, e.g.0.3
Default 0.3
org.jpedal.pdf2html.compressImages
Compress PNG images to reduce file size
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.compressSVG
Generates compressed .svgz files rather than .svg
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.containerId
Set the id to use for the page container div
Required? No
Accepted Values
- Any string
Default jpedal
org.jpedal.pdf2html.convertPDFExternalFileToOutputType
Set whether to convert links pointing to file.pdf into file.html inside GoToR and Launch link annotations.
Required? No
Accepted Values
- true
- false
Default true
org.jpedal.pdf2html.convertSpacesToNbsp
Convert spaces into Non-breaking Spaces ( ) in the output
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.decoupleEmptyValues
Only active when org.jpedal.pdf2html.decoupleFormData is true, this setting allows you to populate formdata.json with all fields present in the PDF, including entries that have empty values
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.decoupleFormData
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 values. This behaviour can be changed with the org.jpedal.pdf2html.decoupleEmptyValues setting. In order to have the desired effect, this setting will also not output the AP images of readonly text fields
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.disableComments
Disable comments inserted into the HTML output for clarity
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.disableLinkGeneration
Disables the generation of clickable links (when present in the PDF) and outputs as plain text instead.
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.embedImagesAsBase64Stream
Insert the images directly into the file as a base64 stream instead of referencing an external file
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.enableAcroFormJS
Enable JavaScript from the AcroForms to be included in the conversion output. JavaScript functionality must already be present in the PDF.
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.formFieldBackgroundHighlight
Add a background of the specified colour to form fields. The specified colour must be in either long or short hexadecimal format.
This option currently adds a background to:
- Text boxes
- Select Boxes
This option does not add a background to:
- Checkboxes
- Radio Buttons
- Buttons
Required? No
Possible Values
Any colour in hexadecimal format
e.g. “#FFF0F5”
Note: Invalid values will cause background highlighting to be skipped and an error to be logged.
Default null
org.jpedal.pdf2html.formFieldBorderHighlight
Add a border of the specified colour to form fields. The specified colour must be in either long or short hexadecimal format.
This option currently adds a border to:
- Text boxes
- Select Boxes
- Buttons
This option does not* add a border to:
- Checkboxes
- Radio Buttons
Note: *Checkboxes and radio buttons will have a border highlight when noCheckboxOrRadioButtonImages is enabled.
Required? No
Possible Values
Any colour in hexadecimal format
e.g. “#FF0000”
Note: Invalid values will cause border highlighting to be skipped and an error to be logged.
Default null
org.jpedal.pdf2html.fontsToRasterizeInTextMode
In svg_realtext this flag will have the specified fonts appear as part of SVG as Vectors. This setting has no effect on other modes,
Required? No
Accepted Values
- INCLUDE=font1,font2,font3
- EXCLUDE=font1,font2,font3
Note: INCLUDE will only rasterize the listed fonts, EXCLUDE will rasterize all fonts except those in the list.
Default null
org.jpedal.pdf2html.formTag
Replacing <form>
with your version.
Required? No
Accepted Values
<form **your code here**>
Default <form>
org.jpedal.pdf2html.generateSearchFile
Generates a search.json file containing the text of the document you can process for different uses such as search.
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.imageScale
Write out larger images to allow higher quality zooming. Value is a float from 0.1 to 10 where 1 is 100%.
Required? No
Possible Values
Any float value from 0.1 to 10
Default 1
org.jpedal.pdf2html.includedFonts
Set font type to convert to and include in HTML and CSS output.
Required? No
Accepted Values
- woff
- otf
- woff_base64
- otf_base64
Default woff
org.jpedal.pdf2html.inlineJavaScriptAndCSS
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.
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.inlineSVG
Inline SVG within HTML (pure SVG text modes only).
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.keepGlyfsSeparate
Position each glyph individually for more accurate text positioning
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.logicalPageRange
Set a page range to convert using logical page numbering.
Required? No
Possible Values
A string of comma separated values including ranges
e.g. “1,3,5-8,10”
Default null
org.jpedal.pdf2html.maxPageHeight
Sets the maximum height of the converted document. This can be used in conjunction with maxPageWidth to limit page dimensions to a given size.
Pages larger than the given dimensions will be scaled down to fit within those dimensions. Pages smaller than the given dimensions will be unaffected.
This setting may be useful to prevent rogue documents with unusually large pages from causing OutOfMemoryErrors (which may otherwise bring down the JVM).
Expected values:
- Any positive integer value
org.jpedal.pdf2html.maxPageWidth
Sets the maximum width of the converted document. This can be used in conjunction with maxPageHeight to limit page dimensions to a given size.
Pages larger than the given dimensions will be scaled down to fit within those dimensions. Pages smaller than the given dimensions will be unaffected.
This setting may be useful to prevent rogue documents with unusually large pages from causing OutOfMemoryErrors (which may otherwise bring down the JVM).
Expected values:
- Any positive integer value
org.jpedal.pdf2html.noCheckboxOrRadioButtonImages
Form elements inside PDFs can contain an AP dictionary with instructions for how to display the various states:
- hover
- onclick
- checked
- unchecked
By default, these appearances are written as images.
This setting disables these images for checkboxes and radio buttons. Instead, the standard browser appearances for the <input> implementations are used.
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.outputContentMode
The output content mode affects what content is included in the generated output. This can be used to reduce unwanted content.
Required? No
Accepted 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
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.
Default DEFAULT
org.jpedal.pdf2html.outputThumbnails
Output thumbnails of pages in /thumbnails/.
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.password
Set a password to be used when opening files
Required? No
Accepted Values A String
Default null
org.jpedal.pdf2html.pixelsPerInch
Set the internal resolution which determines the page size at 100% zoom/scaling.
The default size of a unit in the PDF coordinate system is 1/ 72 inch (72 units per inch). However, the majority of PDF readers display PDF files at either 96 or 110 PPI (pixels per inch). This means that at 100% zoom/scaling, most PDF Readers actually apply an internal scaling of ~1.33 (110/ 96) or ~1.528 (110/ 72).
FormVu uses the same technique by using a default resolution of 110 PPI, which is why the pixel values in the output produced are approximately 1.5x the units defined within the PDF file.
This configuration option can be used to modify the resolution, for example using a value of 72 would mean the pixel values align with the units defined within the PDF file.
Note: Other settings (such as scaling, maxPageWidth and maxPageHeight) also affect the size of the converted document.
Note: This setting should not be thought of as affecting pixel density. Instead, it determines the page size at default zoom/scaling.
Expected Values Any positive integer value, although in practice a value such as 72
, 96
or 110
would be typical.
Default 110
Since 2024.08
org.jpedal.pdf2html.realPageRange
Set a page range to convert using real page numbering. Value is a string of comma separated values including ranges.
Required? No
Possible Values A string of comma separated values including ranges
e.g. “1,3,5-8,10”
Default null
org.jpedal.pdf2html.scaling
Sets the Scaling value of the converted content. There are four types of value,a float multiplier (e.g. 1)best fit of width(e.g. fitWidth1000)height(e.g. fitHeight1000)or both(e.g. 1000x1000)
Required? No
Possible Values
- a float multiplier (e.g. 1)
- best fit for width (e.g. fitWidth1000)
- best fit for height (e.g. fitHeight1000)
- best fit for width and height (e.g. 1000x1000)
Default 1
org.jpedal.pdf2html.separateTextToWords
Improve text position accuracy by dividing text chunks into words based on spaces
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.submitUrl
Set the default pdf form submission URL. Used for the “Submit Form” button in the converted output
Required? No
Accepted Values
- Any string
Default null
org.jpedal.pdf2html.tinyTextRemovalThreshold
Removes text below the given font size in the generated output.
This prevents files containing a large amount of tiny text from creating bloated output which is slow to load and render in the web browser.
Note: This value is based on the PDF coordinate system, meaning it acts independently of the values used for the scaling and pixelsPerInch settings.
Required? No
Accepted Values
- Any positive float value, or 0 to disable this functionality.
Default 0.5
Since 2024.08
org.jpedal.pdf2html.textMode
Text mode controls how text is rendered in the html output
Required? No
Accepted Values
- svg_realtext
- svg_shapetext_selectable
- svg_shapetext_nonselectable
- image_realtext
- image_shapetext_selectable
- image_shapetext_nonselectable
Default svg_realtext
org.jpedal.pdf2html.useDRFormFonts
Be warned, this setting is experimental and is expected to be changed throughout versions
Allows control over whether embedded form fonts in DR object are used for display in text field
Required? No
Accepted Values
- true
- false
Default false
org.jpedal.pdf2html.useFormVuAPI
Output the formvuapi.js file, which handles custom functionality such as submitting forms as JSON
Required? No
Accepted Values
- true
- false
Default true
org.jpedal.pdf2html.useLegacyImageFileType
Output all images as PNGs
Required? No
Accepted Values
- true
- false
Default false