Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

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.



Converting PDF/ Office Documents to HTML?

Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Leave a Reply

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

IDRsolutions Ltd 2021. All rights reserved.