possibility to choose compression level for PDF output

Bug #171774 reported by Ecliptux-users
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Wishlist
Unassigned
inkscape (Debian)
Confirmed
Unknown

Bug Description

Hi,

I'm using Inkscape for a while and since I have installed the lastest
version 0.45, when I'm exporting of a page on PDF format, the generate file
is very big
 - with Inkscape < 0.45 : 300ko
 - with Inkscape = 0.45 : 1.8Mo

I saw in the changelog this :

*******************************************
 PDF export

Inkscape's PDF exporter has been improved:

    * New features: bitmap images can be embedded; PDF files can be
exported from command line using the --export-pdf parameter.

    * Changed behavior: the pointless text to path question is gone.

    * Fixed bugs: save failure is now detected, miter limits are now >= 1,
PDFs with transparent gradient are now embeddable, eccentric elliptic
gradients fixed, dash style inheritance fixed, transparency inheritance
fixed.
*******************************************

Maybe there is an option somewhere to set the exports properties of the PDF
files but I did'nt find it :o/

Tags: exporting pdf
Revision history for this message
Ecliptux-users (ecliptux-users) wrote :

Originator: YES

OK I think I have found the answer by myself on
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/File-Export.html#File-Export-Other
:

==========================================
 .pdf (PDF). Text is automatically converted to paths. The following
features are unsupported: Gradients on stroke, clipping, masking, patterns.
(Note: Evince, a popular Linux Postscript and PDF viewer does not show
gradients with transparency, use Acroread instead.)

Saving PDF via a Postscript file removed in v0.45.

Expect great improvements in PDF export in the next Inkscape release! A
Cairo based exporter is almost ready.

Export to PDF produces uncompressed PDF files (which is legal according to
the standard). Some operating systems and display software may complain.
=============================================

I hope in future version we'll have the possibility to choose the
compression level for the pdf output file :)

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

Originator: NO

The problem is most likely not uncomression. Unfortunately cairo currently
rasterizes any gradients in PDF. You are advised to use 0.45 for PDF export
for now until this is fixed.

Revision history for this message
Horkana-users (horkana-users) wrote :

Originator: NO

To summarize, PDF exporter is a work in progress and will continue to be.
As support for more features was added the file size inevitably got bigger
as there was less data loss. Keep trying out the latest versions of
inkscape and alternative PDF exporters for best results.

the remaining question of being allowed to set the compression level can
be filed an enhancement request, so I'm moving this out of bugs and saving
you the trouble of refiling. keep in mind the maximum compression level
will make for a slightly slower save time. the reason so many people use
the standard Zip compression levels is that they offer such a good tradeoff
in time against space saved (the extra time required to compress even
further offers les and less extra returns but if you are happy to make the
tradeoff).

nightrow (jb-benoit)
Changed in inkscape:
importance: Undecided → Wishlist
status: New → In Progress
tags: added: pdf
Revision history for this message
Pander (pander) wrote :

In version 0.47, compressed PDF export is still not supported. This is the workaround:
  http://wiki.inkscape.org/wiki/index.php/Current_PDF_Support#Uncompressed_PDF_Output
When it takes a long time for cairo to support for compressed PDF, implement a workaround.

Provide an option when saving as PDF that is called "compress via EPS" or at least provide some text to the users that when compression is needed, to export first to EPS and then convert it to PDF. Which would only work easily on Linux, since these users have epstopdf.

Please improve PDF compression in one way or another (workaround, upgrade cairo, some helpful text, etc.) as soon as possible.

Revision history for this message
Pander (pander) wrote :

The workaround is degrading the quality, so it is not really an option. Since the PDF I am creating has to upload and it cannot be as large as it is now, I am really stuck since the receiving sit does not change upload sizes.

Another alternative is
  pdftk a.pdf output b.pdf compress
but is resulting in the same file with same size.

Please, if someone knows another workaround, let me know. Or better when cairo 1.10 will de used.

According to me the priority of this issue should be increased.

Thanks,

Pander

Revision history for this message
su_v (suv-lp) wrote :

Changing status back to 'Confirmed' because there has been no recent activity towards implementing enhanced PDF export options supporting different compression levels.

Changed in inkscape:
status: In Progress → Confirmed
Revision history for this message
Pander (pander) wrote :

The cairo snapshot 1.9.6 is already supporting compression. You could use that to develop already PDF compression options in Inkscape so it is ready to go with the next version of cairo 1.10 which will follow soon.

Version 1.9.6 supports --compress in cairo-trace. Release notes are here:
  http://cairographics.org/news/cairo-1.9.6/
Files are here:
  http://cairographics.org/snapshots/?C=M;O=D

Changed in inkscape (Debian):
status: Unknown → New
Changed in inkscape (Debian):
status: New → Confirmed
Revision history for this message
Pander (pander) wrote :

Meanwhile Inkscape is build against cairo 1.13.0 (on Ubuntu Utopic). Can compression now be supported for PDF?

su_v (suv-lp)
Changed in inkscape:
assignee: Mental-users (mental-users) → nobody
Revision history for this message
Pander (pander) wrote :
Revision history for this message
ScislaC (scislac) wrote :

@Pander: I would ask questions of this nature on the mailing lists, the bug tracker is not an appropriate place for this discussion. The devel or user lists would be where to ask: https://inkscape.org/en/community/mailing-lists/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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