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 – Just the content…

29 sec read

Sometimes you do not want to generate a full HTML page when you convert from PDF to HTML5. For example, if the content is being fed into a Content Management system which then adds its own page layout, you would want just the content (no HTML, HEAD or BODY tags). So we have added a flag in the latest release to allow you to do this. Here is the new code in our ExtractPagesAsHTML example (the code is commented out by default which will include the HTML structure).

/**
  * exclude HTML and body tags 
  * (you will need to call draw method yourself)
**///HTMLoutput.setBooleanValue(HTMLDisplay.ExcludeMetadata, true);

One important function of the Body tag is to call the Javascript for the page so you will need to add that manually from your own code when you build the page tags.

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 *