When we convert a PDF to HTML we take the PDF page size. So for a standard PDF file, this might well be around 840×595 pixels. This is fine for most uses but sometime users want a larger version.
So we also include a scaling option. When we scale it, we preserve aspect ratio (otherwise the page would look odd). So you could alter this document to be 1680x 1190 pixels or any scaling value (we will multiply 840 and 595 or whatever the dimensions are by this number). And it can also be less than 1 (so you could reduce it to 420×298 pixels).
This works well but up until now it has need you to edit and recompile our example Java code. So we have added a flag so that you can set this value without this when you run the code.
So if you convert PDF to HTML with this Java code
java -Xmx512M -Dorg.jpedal.jai=true -Dorg.jpedal.scaling=”1.5″ -jar JPDF2HTML.jar /Users/markee/html/ /Users/markee/abc/
would give you an HTML file one and a half times the size of the PDF file.
What other features would you like to see as command line flags?
Latest posts by Mark Stephens (see all)
- Saving your settings in our online PDF to HTML5 and SVG converter - May 20, 2013
- PDF teasers – how would you handle this stack problem? - May 15, 2013
- Where do your PDF objects start in a PDF file? - May 8, 2013
- Version 5 release – Swing and javaFX - April 26, 2013
- Which languages should have examples when documenting a web service? - April 24, 2013