Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

User feedback and suggestions for improving HTML5 output

59 sec read

We have been getting lots of feedback and bug reports from users and potential users. Please keep them coming – that is how we can improve the conversion! There is no manual on what works best for PDF to HTML5 conversion so it is only by seeing the results and tuning the heuristics that we can improve the process…

One particularly interesting case I saw last week involved a PDF where the first letter of the word was in a different font. Because we auto fit the rest of the word (but not the first character), the rest of the word was appearing one text size smaller and looked odd as a result. So I am currently experimenting with avoiding the auto-fit in this case.

Another user, suggested that converting PDF files to version 1.5 improved HTML5 conversion (presumably as it simplifies the Postscript data which gives cleaner HTML5). Here is his suggestion:-

Here is the command to convert the PDF to a optimized PDF. The converted PDF works much better with your JPDF2HTML5 Library than the original one. I think you can post a blog entry for other users which can be very helpful. I run this command for every PDF before running JPDF2HTML5 and every PDF with problem (see attachment) worked well.

The command is available with ghostscript library on linux:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Thanks to Thoren for his suggestion. If you have any issues with PDF files not converting to HTML5 please let us have the files as a bug report so we can investigate. Or do you have any tips to share?

Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Converting your PDF files to HTML5 with BuildVu 

Recently we announced our updated product range for 2018 and are rebranding some existing products, like JPDF2HTML5 which has been renamed to BuildVu. It...
Georgia Ingham
3 min read

Favourite resources from our HTML development team

As the web progresses and grows, so do the technologies that come along with it. Trying to keep on top of everything you need...
Ovidijus Okinskas
1 min read

How HTML5 Javadocs in Java 9 will make your…

Here at IDRsolutions we are very excited about Java 9 and have written a series of articles explaining some of the main features. In...
Rob
1 min read

4 Replies to “User feedback and suggestions for improving HTML5 output”

  1. Every thing works great the only issue i saw was in an equation that includes division the horizontal line is missing but all the other parts of formula is placed nicely

    U R AWESOME

    This is the best PDF converter i have ever seen

  2. can u please change the soft to output epub/mobi/azw as well as html5?

    U’re doing great KEEP UP THE GOOD WORK

    Do u have any stand-alone desktop application?

  3. EPub needs reflow which does not exist in the PDF so that is unlikely.

    What do you mean by desktop application. You can convert the PDF to HTML5 as a complete viewer so it is visible in any desktop viewer.

    You can run the converter as a Java jar on a machine.

Leave a Reply

Your email address will not be published. Required fields are marked *