BuildVu has various settings which control how the content is generated.
By default, BuildVu generates a separate file per page, with individual assets also externally referenced or embedded within the file. BuildVu also has a singlefile mode, which embeds all pages embedded within one HTML file.
It is important to consider performance when using singlefile mode. PDF files are designed to be random access, and PDF readers are able to display individual pages without needing to load the entire document. The IDRViewer mimics this behaviour by loading individual pages dynamically.
However, when using singlefile mode, the entire document is loaded at once. Documents that are complex or have a large number of pages can be slow to load and may even hang or crash the web browser (particularly on mobile devices). It is therefore recommended that you use the singlefile mode only for small documents, or for other workflows where the document is not loaded in a browser.
These following configuration options can enable embedding of external assets:
- setIncludedFonts (set to a Base64 variant)
- setEmbedImagesAsBase64Stream (set to true)
- setInlineSVG (set to true) (BuildVu-HTML only)
When using the idrviewer
or content
view mode, we recommend against embedding fonts as Base64 because it forces BuildVu to generate duplicate copies of fonts between pages, and prevents optimizations to deduplicate fonts. This results in increased converted file size and slower document loading. In singlefile mode, BuildVu is able to properly optimize and deduplicate the fonts.