Link

Options (JVM Flags)

FormVu offers various options to change the way forms are converted. If you are running FormVu via command line you can use the JVM flags listed below to configure the options. If you are running FormVu via Java code, you can interact with the API methods defined by the Javadoc. An example of command-line usage with JVM flags would be with the following command:

java -Dorg.jpedal.pdf2html.encryptTempFiles=true -Xmx512M -jar formvu.jar /inputDirectory/ /outputDirectory/

Available Settings

  1. encryptTempFiles
  2. outputThumbnails
  3. generateSearchFile
  4. textMode
  5. disableComments
  6. addJavaScript
  7. inlineSVG
  8. omitNameDir
  9. compressSVG
  10. scaling
  11. logicalPageRange
  12. realPageRange
  13. embedImagesAsBase64Stream
  14. convertSpacesToNbsp
  15. convertPDFExternalFileToOutputType
  16. formTag
  17. includedFonts
  18. keepGlyfsSeparate
  19. separateTextToWords
  20. fontsToRasterizeInTextMode
  21. compressImages
  22. useLegacyImageFileType
  23. completeDocument
  24. containerId
  25. outputContentMode

encryptTempFiles

Enables encryption of all temporary files that may be created during the conversion process.

Flag:

-Dorg.jpedal.pdf2html.encryptTempFiles=<value>

Expected values:

  • true
  • false

Javadoc: setEncryptTempFiles


outputThumbnails

Output thumbnails of pages in /thumbnails/

Flag:

-Dorg.jpedal.pdf2html.outputThumbnails=<value>

Expected values:

  • true
  • false

Javadoc: setOutputThumbnails


generateSearchFile

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 searching.

search.json is always generated in the IDRViewer Complete UI. Search is not supported as standard in other IDRViewer UI modes.

Flag:

 -Dorg.jpedal.pdf2html.generateSearchFile=<value>

Expected values:

  • true
  • false

Javadoc: setGenerateSearchFile


textMode

The text-mode controls how text is rendered in the HTML output, for example, your text can be made selectable or as an image and made non-selectable.

For an explanation of text modes, please click here.

Important: shapetext modes extract the font metrics from the embedded fonts and includes them as shapes. If there are no embedded fonts then the converter will use Arial to ensure that text is actually displayed, although this may not be an ideal match (and we recommend using embedded fonts).

In the case where there are no embedded fonts, it’s best to use a realtext mode.

Flag:

 -Dorg.jpedal.pdf2html.textMode=<value>

Expected values:

  • svg_realtext
  • svg_shapetext_selectable
  • svg_shapetext_nonselectable
  • image_realtext
  • image_shapetext_selectable
  • image_shapetext_nonselectable

Javadoc: setTextMode


disableComments

Disable comments inserted into the HTML output for clarity.

Sections within the generated output are marked up with to aid understanding of generated output and help parsing if necessary. Enabling this setting will remove those comments.

Flag:

 -Dorg.jpedal.pdf2html.disableComments=<value>

Expected values:

  • true
  • false

Javadoc: setDisableComments


addJavaScript

Include all the JavaScript that is within the PDF file.

Flag:

 -Dorg.jpedal.pdf2html.addJavaScript=<value>

Expected values:

  • true
  • false

Javadoc: setAddJavaScript


inlineSVG

Inline SVG within HTML (pure SVG text modes only).

This inlines the SVG within HTML so that there is no separate .svg file.

Flag:

 -Dorg.jpedal.pdf2html.inlineSVG=<value>

Expected values:

  • true
  • false

Javadoc: setInlineSVG


omitNameDir

Controls the folder structure of the output.

By default, pages are output within a directory with the same name as the PDF file within the output directory specified.

Setting omitNameDir to true will cause pages to be output directly within the output directory specified.

Flag:

 -Dorg.jpedal.pdf2html.omitNameDir=<value>

Expected values:

  • true
  • false

Javadoc: setOmitNameDir


compressSVG

Generates compressed .svgz files rather than .svg (you will need to configure your webserver to correctly serve these).

It is recommended to enable this setting as SVG file sizes can be reduced by as much as 80-90%!

SVGZ files are simply SVG files which have been gzip-compressed. Gzip compressed SVG files are supported by all modern browsers (IE9 onwards, Firefox, Chrome, etc) as long as the webserver is configured correctly.

For more information, please click here.

Flag:

 -Dorg.jpedal.pdf2html.compressSVG=<value>

Expected values:

  • true
  • false

Javadoc: setCompressSVG


scaling

Sets the Scaling value of the converted content.

Flag:

 -Dorg.jpedal.pdf2html.scaling=<value>

Expected values:

  • 1 (float multiplier)
  • 1000x1000 (best fit width/height)
  • fitWidth1000 (best fit width)
  • fitHeight1000 (best fit height)

Javadoc: setScaling


logicalPageRange

Set a page range using logical page numbering.

For example, let’s assume a 7 page document with a page range of “2,4,6”.

When using this setting, you will get 1.html, 2.html and 3.html, and navigation bars would assume that only these 3 pages exist.

Flag:

 -Dorg.jpedal.pdf2html.logicalPageRange=<value>

Expected values:

  • Comma-separated values including ranges. E.g. “1,3,5-8,10”

Javadoc: setLogicalPageRange


realPageRange

Set a page range using real page numbering.

For example, let’s assume a 7 page document with a page range of “2,4,6”.

When using this setting, you will get 2.html, 4.html and 6.html, and navigation bars would behave as if pages 1, 3, 5 and 7 exist.

Flag:

 -Dorg.jpedal.pdf2html.realPageRange=<value>

Expected values:

  • Comma separated values including ranges. E.g. “1,3,5-8,10”

Javadoc: setRealPageRange


embedImagesAsBase64Stream

Embed images as Base64 stream.

Inserts the images directly into the file as a base64 stream instead of referencing an external file.

Flag:

 -Dorg.jpedal.pdf2html.embedImagesAsBase64Stream=<value>

Expected values:

  • true
  • false

Javadoc: setEmbedImagesAsBase64Stream


convertSpacesToNbsp

Convert spaces to &nbsp; in the output.

Flag:

 -Dorg.jpedal.pdf2html.convertSpacesToNbsp=<value>

Expected values:

  • true
  • false

Javadoc: setConvertSpacesToNbsp


convertPDFExternalFileToOutputType

Set whether we convert links pointing to file.pdf into file.html (default is true).

Flag:

 -Dorg.jpedal.pdf2html.convertPDFExternalFileToOutputType=<value>

Expected values:

  • true
  • false

Javadoc: setConvertPDFExternalFileToOutputType


formTag

Replacing <form> with your version.

Flag:

 -Dorg.jpedal.pdf2html.formTag=<value>

Expected values:

  • <form your code here>

Javadoc: setFormTag


includedFonts

Set fonts to convert to and include in HTML and CSS output.

Will accept any comma-separated list of the expected values.

Flag:

 -Dorg.jpedal.pdf2html.includedFonts=<value>

Expected values:

  • woff
  • otf
  • cff
  • woff_base64
  • otf_base64

Javadoc: setIncludedFonts


keepGlyfsSeparate

Position each glyph individually for more accurate positioning.

Produces a larger file but may suit some use cases

Flag:

 -Dorg.jpedal.pdf2html.keepGlyfsSeparate=<value>

Expected values:

  • true
  • false

Javadoc: setKeepGlyfsSeparate


separateTextToWords

Divide text chunks into words based on spaces This improves accuracy but not as much as keepGlyfsSeparate, It produces a larger file but may suit some use cases.

Flag:

 -Dorg.jpedal.pdf2html.separateTextToWords=<value>

Expected values:

  • true
  • false

Javadoc: setSeparateToWords


fontsToRasterizeInTextMode

In Text Modes, you can override real text on a font by font basis,

In svg_realtext text will appear as part of SVG as Vectors This setting has no effect on other modes,

Needs to start EXCLUDE= or INCLUDE= followed by a list of comma-separated fonts Comparison is case-insensitive so Arial, ARIAL and arial are the same.

Flag:

 -Dorg.jpedal.pdf2html.fontsToRasterizeInTextMode=<value>

Expected values:

  • INCLUDE=font1,font2,font3

  • (rasterized JUST these fonts)

  • EXCLUDE=font1,font2,font3

  • (rasterized all fonts EXCEPT these fonts)

Javadoc: setFontsToRasterizeInTextMode


compressImages

When enabled, generated PNG images will be compressed to reduce file size.

This setting has an effect only when SVG text modes are used, or when setUseLegacyImageFileType is set to true.

Rather than producing 24-bit RGB or 32-bit RGBA truecolor PNG images, instead the converter will produce 8-bit palette images that have undergone quantization and dithering. This is a lossy compression, but visual quality remains very high.

Enabling compression will make conversion slower. On average, expect conversion time to at least double. File size saving can be significant. On files with large images, it is not unusual to see savings of 70-80% on the image file size.

Flag:

 -Dorg.jpedal.pdf2html.compressImages=<value>

Expected values:

  • true
  • false

Javadoc: setCompressImages


useLegacyImageFileType

If enabled, all images output will use the PNG file type.

Flag:

 -Dorg.jpedal.pdf2html.useLegacyImageFileType=<value>

Expected values:

  • true
  • false

Javadoc: setUseLegacyImageFileType


completeDocument

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 behaviour in SVG conversion.

Flag:

 -Dorg.jpedal.pdf2html.completeDocument=<value>

Expected values:

  • true
  • false

Javadoc: setCompleteDocument


containerId

Set the id to use for the page container div.

Flag:

 -Dorg.jpedal.pdf2html.containerId=<value>

Expected values:

  • A string

Javadoc: setContainerId


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.

Flag:

 -Dorg.jpedal.pdf2html.outputContentMode=<value>

Expected 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

Javadoc: setOutputContentMode