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);

What's included in your BuildVu trial?

  • Access to download the SDK and run it locally.
  • Access to the cloud trial to convert documents in the IDR cloud.
  • Access to the Docker image to set up your own trial server in the cloud.
  • Communicate with IDR developers to ask questions & get expert advice.
  • Plenty of time to experiment and build a proof of concept.
  • Over 100 articles to help you get started and learn about BuildVu.
  • An exceptional PDF to HTML converter that took over 20 years to build!

Start Your Free Trial