Link

Embed SVG As Base64 Image

Embeds the SVG background directly into the HTML file as a base64 image. This also has the effect of base64 embedding the images inside the SVG.

Where possible, we recommend using the inlineSVG setting instead as it is more efficient. This is because base64 uses 4 ascii characters to encode 24-bits (3 bytes) of data. With this setting, images are base64 encoded within the SVG, and then the SVG is itself also base64 encoded within the HTML. Therefore, images use 1.78x bytes compared with externally referencing them. In addition, inline SVG is highly compressible when gzip compression is enabled by the web server, whereas base64 content is not.

Note: This setting is not compatible with the experimental text mode setting.

Expected values:

  • true
  • false

Default: false

Since: 2022.08

Usage Examples

Command Line

-Dorg.jpedal.pdf2html.embedSvgAsBase64Image=true

Cloud

{ "org.jpedal.pdf2html.embedSvgAsBase64Image": true }

Java

conversionOptions.setEmbedImagesAsBase64Stream(true);

Start Your Free Trial


Customer Downloads