You can run BuildVu directly from the command line which is useful for running the converter from another language or script.
- You must download buildvu.jar
- Requires Java 8 or later (see version compatibility)
- Run from the same location as the buildvu jar or provide an absolute path
java -Xmx512M -jar buildvu.jar /inputDirectory/ /outputDirectory/
You may want provide more memory by increasing the Xmx value.
HTML or SVG mode?
The default output mode is HTML. To generate 100% SVG content (which provides a more accurate conversion), you can set -Dorg.jpedal.pdf2html.svgMode=true
java -Dorg.jpedal.pdf2html.svgMode=true -jar buildvu.jar /inputDirectory/ /outputDirectory/
IDRViewer or Content mode?
The default mode generates the document inside the IDRViewer. To generate just the raw content to be used inside your own custom solution, you can set -Dorg.jpedal.pdf2html.viewMode=content
java -Dorg.jpedal.pdf2html.viewMode=content -jar buildvu.jar /inputDirectory/ /outputDirectory/
How are the settings controlled?
When running from command line, settings are controlled by passing in system properties. Available settings and their values can be found in the Javadocs. The key classes are:
- HTMLConversionOptions (Settings available for the HTML mode)
- SVGConversionOptions (Settings available for the SVG mode)
- IDRViewerOptions (Settings available for the IDRViewer mode)
- ContentOptions (Settings available for the Content mode)
java -Dorg.jpedal.pdf2html.compressImages=true -jar buildvu.jar /inputDirectory/ /outputDirectory/
BuildVu includes functionality to decrypt encrypted PDF files but if you wanted to specify an alternative provider then you can still do so using -Dorg.jpedal.securityprovider. Remember to add the security provider to the classpath if needed e.g.