When we developed our original product for the Times Newspaper to extract Newspaper content from PDF files 12 years ago, I spent a lot of time looking at pages and working out heuristics to achieve the best conversion. This was a good training ground for PDF to HTML5 conversion as I now spend a lot of time working out the best way to handle various structures in HTML5.
Today, I have been looking at this text in a PDF file
The first letter of each word is being made bigger to emphasize it. This works fine in PDF but HTML5 does not give us that much control on positioning. If we try to do this, it looks horrible:-(
We are better off keeping the text the same size like this.
This looks much closer to the original version and produces smaller files.
The final step is to run the change against our baseline of HTML5 and review any changes – turns out it works really well on large font sizes but best avoided on smaller sizes. A little bit of tweaking and reset the baseline. Then it is on to look at the next possible enhancement…
Latest posts by Mark Stephens (see all)
- First impressions of the new RaspberryPi for Raspbian, Riscos, Java and NetBeans - March 3, 2015
- Converting a Swing application into JavaFX – Listeners and fast scrolling - February 3, 2015
- BCS talk by Liz Bacon and dinner at Greenwich - January 22, 2015
- Updating all your Fogbugz colleagues using a virtual user - January 15, 2015
- 5 reasons why JavaFX is better than Swing for developing a Java PDF viewer - January 6, 2015