vectorgraphics2d icon indicating copy to clipboard operation
vectorgraphics2d copied to clipboard

Add support for compressed files

Open eseifert opened this issue 10 years ago • 3 comments

There should be an option to save vector data of text based vector formats (like EPS, PDF, and SVG) to more compact versions. This will produce much smaller files.

Several levels of compression could be implemented. Lossy compression of image data (e.g. as JPEG) could save even more space.

Possible compression formats:

  • EPS: gzip compression (.eps.gz)
  • PDF: deflate compression for streams and images (.pdf)
  • SVG: gzip compression (.svgz)

eseifert avatar Mar 30 '15 14:03 eseifert

I just hacked up a work around for this in my own project to save PDFs with Flate compression. The implementation of PDF already supports Flate compression (at least it seems to work) but due to the way the API is structured you can't actually turn it on without reimplementing PDFDocument.

noelwelsh avatar Jun 03 '16 07:06 noelwelsh

Thanks for your feedback @noelwelsh. I have implemented a compression option for PDFGraphics2D now—other formats will follow soon. It's already in master and will be included in the upcoming 0.11 release.

This bug will stay open until compression is ready for EPS and SVG, too.

eseifert avatar Jun 04 '16 10:06 eseifert

Great! Looking forward to the next release.

noelwelsh avatar Jun 04 '16 10:06 noelwelsh