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.

PDF to HTML conversion – 3 ways to make a HTML version of a PDF

44 sec read

As I have been asked this frequently, I thought it would make a good blog topic.

When you create an HTML version of a PDF file, you can essentially do this in the following ways:-

1. Draw everything onto an image of the page and show the image. This has the advantage that it looks exact but results in very large files. When you scale in you get pixellation.

2. Place the text inside a div element and put the rest on the image. This gives you better text quality on scaling but you will need the correct fonts and the text positioning may not be exact. You still get the problems with a big image.

3. Place the text inside a div element and use the Canvas of SVG for all Vector content. This removes the need for a huge image. You could still see some pixellation on the canvas but the file is much smaller. The downside is that you need a modern browser.

If you want to see the sort of results, you can get with option 3, why not give our PDF2HTML5 convertor a spin?

This post is part of our “SVG Article Index” in these articles, we aim to help you build knowledge and understand SVG.

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

Leave a Reply

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