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 HTML5 conversion – PostScript font support

40 sec read

PDF to HTML5 conversion has to deal with the issue of embedded fonts in PDF files, and there are THREE ways to do this:-

1. Ignore the issue and hope the text looks okay in the available fonts.

2. Convert the text into shapes or draw as images.

3. Create new fonts for web use and use the embedded font  within the HTML5 page.

We decided to go with option 3 for our PDF to HTML5 conversion. There are 2 font technologies used in PDF files – Truetype and Postscript. We added initial support for Truetype last year and today we added the first release of the PostScript font support (we are creating OpenType fonts (otf) to provide support for the most platforms).

You can see the difference it makes in this screenshot (font substituted on the left and extracted and reused on right). What do you think?

Because it is a first release we have left it disabled as the default. You can enable it with the JVM flag -DconvertOTFFonts=”true”

We look forward to your feedback…

This post is part of our “Fonts Articles Index” in these articles we explore Fonts..

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 PDF2HTML5 

Recently we announced our updated product range for 2018 and are introducing two new products named PDF2HTML5 and PDF2SVG along with rebranding some existing...
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 *