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

Get started with BuildVu in 3 steps

  1. Fill in the form to download the trial jar →
  2. Copy the code snippets as instructed on the next page
  3. Build your solution using our docs

Learn more about BuildVu

Start Your Free Trial

Trial License Type