Link
Skip to main content

Compress SVG

Generates compressed .svgz files rather than .svg. This can reduce SVG file sizes by as much as 80-90%, but you will need to configure your web server to correctly serve .svgz files.

SVGZ files are simply SVG files which have been gzip compressed. Gzip compressed SVG files are supported by all modern browsers (IE9 onwards, Firefox, Chrome, etc) as long as the web server is configured correctly.

More modern compression formats with higher compression ratios (such as brotli) are now supported by web servers. If configured appropriately, web servers can automatically generate and serve compressed content without needing to use this BuildVu setting.

Important: When using this BuildVu setting you must ensure that SVGZ files are served with the Content-Encoding: gzip header in order for web browsers to understand them. For further instructions, see Enabling GZIP Compression

Expected values:

  • true
  • false

Default: false

Usage Examples

Command Line

-Dorg.jpedal.pdf2html.compressSVG=true

Cloud

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

Java

conversionOptions.setCompressSVG(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