Exporting to PDF problems (reduced opacity + filter effect)

Bug #381677 reported by Jaromir Coufal on 2009-05-29
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

When I am exporting *.svg file from Inkscape (win32build version Inkscape21345-0905140303.7z) to PDF 1.4, and I have transparent objects as you can see on the attached file, exported PDF file has different transparency than original from inkscape. (some objects are as transparent as they are not visible more...)

tags: added: pdf
Pablo Trabajos (pajarico) wrote :

Can't reproduce on Win XP, 0.47-pre1. We need you to attach the SVG file from which you're exporting the PDF. You might want to attach the PDF too. It's impossible to determine what kind of shape and/or attributes of the object are causing this without those files.

Changed in inkscape:
status: New → Incomplete

i added necessary materials...

su_v (suv-lp) wrote :

reproduced with Inkscape 0.47+devel r9424 on OS X 10.5.8

after removing the filter effects (Gaussian Blur) from the objects they are visible in the exported PDF even though their opacity (10%) has not been changed -> this bug seems more related to rasterizing filter effects on export to PDF.

tags: added: exporting filters-svg
Changed in inkscape:
importance: Undecided → Medium
status: Incomplete → Confirmed
su_v (suv-lp) wrote :

Removing the object opacity and adding transparency in the filter effect (using Color matrix) produces a PDF out put close to the rendering of the SVG in Inkscape.

su_v (suv-lp) wrote :
su_v (suv-lp) wrote :

… above result indicates to me that the combination of object opacity and rasterized filter effects doesn't work well in PDF export.


Inkscape ver.: Inkscape 0.48.0 r9654 on Mac OS 10.4.11 / PowerPC

Here are more example files for this issue. When exporting to pdf, the image plane (shaded parallelogram in the middle) will appear in the pdf if the opacity is set to 100%, but it will not appear in the pdf if opacity is set to 99%.

su_v (suv-lp) wrote :

@Chas - what PDF viewer do you use? In both of your PDF file the image plane is visible when viewing them in Apples's Preview on OS X 10.5.8.

There is a problem when reopening the PDFs in Inkscape, but it is not related to the issue described here ( bug #381677):
The plane with reduced opacity in the second PDF is imported as a clipped pattern (as opposed to the one with 100%) and only partially or randomly (depending e.g. on zoom level) visible, a known issue recently reported in

Bug #643093 “In imported PDF, some objects not rendered / partially rendered”:

and the underlying cause a long-standing bug:
Bug #168014 in Inkscape: “Redraw fails with clipped object patterns”:

su_v (suv-lp) on 2011-03-06
summary: - Exporting to PDF problems (transparency)
+ Exporting to PDF problems (reduced opacity + filter effect)

more examples at this bug (sorry for the dupe, search function didn't pick this one up..):
Additional error cases include masked objects, etc.

su_v (suv-lp) wrote :

New duplicate bug #828844 provides a reduced test case:
(reproduced with Inkscape 0.48+devel r10554 on Mac OS X 10.5.8 (i386))

tags: added: blur
tags: added: transparency
su_v (suv-lp) on 2012-02-16
tags: removed: blur transparency
Sparhawk (sparhawkthesecond) wrote :

Sorry, do those tags relate to a technical meaning? I just added them to prevent further duplicates, since nothing came up when both Thomas and I searched.

Hachmann (marenhachmann) wrote :

This error still happens in Inkscape 0.91 and 0.92.1pre2.
Another test case SVG attached (derived from a question at https://answers.launchpad.net/inkscape/+question/455791).

Hachmann (marenhachmann) wrote :
Hachmann (marenhachmann) wrote :

I had to deal with this issue for many years. Here is what I think is the problem, but I still don't know whose bug is that...

Inkscape has to rasterize every svg effect.

1) Without added opacity, produced PDF looks like this: Image (rasterized svg effect). Period.
2) With opacity added on top of that effect (as is the situation with flag example), produced PDF looks like: Image (rasterized svg effect), one object group of that image clipped with PDF pattern (not to be confused with pattern you use in Inkscape and bitmap editing software).
That PDF pattern is just transparent image. Summary: Transparent image gets "clipped" with semi-transparent bitmap, which adds up. 50% transparency ends up clipped (think about it as masking in Inkscape terms) with another 50% transparency and you end up with 75% transparency.

I highly recommend trying Scribus layout application to test that. Install unstable 1.5.x to test much improved PDF import. After you import your PDF there, just ungroup until you are left without groups. Enjoy correct transparency.

Michael Ots (topdo9) wrote :

Thanks for the explanation and the workaround Vladimir, I'll look into the scribus. If the double opacity is the case than thats still a bug in my opinion. Hope development pickes it up.

Sparhawk (sparhawkthesecond) wrote :

Regarding finding the source of the bug, I tried embedding Inkscape *.svg images in a LaTeX file, then using pdflatex to render it as pdf shows the same issue. I'm guessing it's some shared svg->pdf library that's to blame.

I also installed scribus 1.5.2, but that workaround didn't work at all for me. I imported my PDF, ungrouped everything, then attempted to export it. Firstly, I got many errors "Error: object has transparency". Then, the exported PDF looks totally wrong. All my winding semi-opaque, blurred paths have become rectangles based on their bounding rectangle.

Can you share your svg and pdf please? I'd like to see how it behaves here.

Eman Modnar (eman-mod) wrote :

I've created an example.

This is how it looks ( http://imgur.com/XDkCW4r )
    - in Inkscape
    - in Firefox
    - rendered as PNG with Inkscape
    - rendered as PDF with `rsvg-convert` tool

And this is how it looks ( http://imgur.com/B0ELyzG )
when *saved as PDF* using Inkscape and then
    - imported back to Inkscape with Poppler option
    - rendered to PNG using Poppler's `pdftocairo` tool
    - opened in Firefox

Eman Modnar (eman-mod) wrote :

You are right. It is unfortunately quite tricky with this one. :/ Hope someone will be able to solve it. I could make it behave in Scribus, but it was tedious to do so. I had to remove manually all the pattern masks and set opacity to each individual object again, which is a pain to do.

To post a comment you must log in.