PNGs are exported uncompressed in PDF / EPS , results in huge files.

Bug #168434 reported by Bug Importer
26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

Saving an Inkscape SVG as a PDF file seems to result in unreasonably
large file sizes, in the range of 20 MB. I've observed this behavior in
multiple files, all of which consist mostly of lines and imported PNG
images. When the same SVG is imported into Scribus and then saved as a
PDF, the resulting file is much smaller, on the order of 100 KB, but of the
same apparent quality.
     I'm using Inkscape 0.45 on Windows XP, SP2, although the same behavior
may exist with other platforms and versions.

Tags: saving win32
Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Originator: NO

Please attach a sample SVG that gives you huge PDF (including all linked
PNGs).

Revision history for this message
Christophe Dehais (christophe-dehais) wrote :

Inkscape seems to embed all bitmaps as uncompressed images in PDFs. Some PNGs, while being lossless, are fairly compressed, and expanding them to raw bitmap produces a greatly bigger amount of data.
The best would be to support some of the various compression algorithms available in PDFs [1] and e.g. keep imported jpg bitmaps as jpgs in the pdf.

[1] http://en.wikipedia.org/wiki/Portable_Document_Format#Raster_images

Revision history for this message
Christophe Dehais (christophe-dehais) wrote :
Revision history for this message
Christophe Dehais (christophe-dehais) wrote :

The attached svg will produce a PDF of nearly 2Mb (compared to 18kb png)

Revision history for this message
bbyak (buliabyak) wrote : Re: Bitmaps are exported uncompressed in PDF / EPS , results in huge files.

current svn with cairo pdf export produces 18 kb pdf

Changed in inkscape:
status: New → Fix Released
Revision history for this message
maelp (mael-primet) wrote :

I have the same problem with the current version of inkscape, a 200k .jpg file result in a 2Mb pdf file

Revision history for this message
phil (fongpwf) wrote :

I see the same problem in 0.48.1 on Windows. I put a 211KB jpeg in the drawing and saved as a PDF. The resulting file is 1441KB.
Trying the same with a PNG file results in a PDF that is only slightly larger.
It seems that the PDF always uses lossless compression rather than the original format. So, the JPEG is expanded.

So, should this be re-opened?

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Ubuntu 10.10, Inkscape trunk revision 10456 and Windows XP, Inkscape 0.47, 0.48 and trunk revision 10441.
The PNG from comment #3 is correctly exported, but JPG files are uncompressed.

Changed in inkscape:
status: Fix Released → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

JazzyNico wrote:
> The PNG from comment #3 is correctly exported,
> but JPG files are uncompressed.

Isn't the issue with JPEG files tracked in bug #168708 “Embedded jpg exported to EPS/PDF as non-jpeg (JPEGs are stored /FlateDecode instead of /DCTDecode)”?

Revision history for this message
jazzynico (jazzynico) wrote :

Ah, yes. Reverting the report status to Fix released.

Changed in inkscape:
status: Confirmed → Fix Released
summary: - Bitmaps are exported uncompressed in PDF / EPS , results in huge files.
+ PNGs are exported uncompressed in PDF / EPS , results in huge files.
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.