JPDF2HTML5 Support

Allowing you to Display Documents on mobile, tablet and desktop

Download Trial Request a quote

This topic contains 0 replies, has 1 voice, and was last updated by  Leon Atherton 1 year, 12 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #2583

    Leon Atherton

    PDF files are random access, which allows pages to be loaded only when needed. This means page 1 of a document can be viewed without having to parse or render the rest of the pages.

    On the other hand, web browsers parse and render the whole document on load. This means that if all pages are included in a single HTML file, then documents that are complex or have a large number of pages are slow to load and can hang or crash browsers (particularly on mobile).

    Our recommendation is to dynamically load pages in an on-demand basis, which is how the IDRViewer works. If you are using the Content mode instead, then the generated content is designed to be easy for you to post-process. Post-processing could include merging pages into a single file if that is your requirement.

    We also have some options that will embed external assets (such as fonts or images) into the HTML files as base64. Look for setIncludedFonts (set to a base64 variant), setEmbedImagesAsBase64Stream, and setInlineSVG in the settings documentation.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.