wrong color in PDF export

Bug #665628 reported by Johan Engelen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned
Inkscape Devlibs
Fix Released
Medium
Unassigned
cairo
Fix Released
Medium

Bug Description

Export bug.svg to PDF (0.48+dev, r9841), the sine wave bottom left is colored green instead of black (see bug.pdf).

The cause for this is probably the default color of the sine, AND the default color of the stroke of the object before the sine.

Simplification of the SVG:
  <path style="fill:none;stroke:#097101;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /> the green line

   <path style="fill:url(#linearGradient6712);fill-opacity:1;stroke:black;stroke-width:0.6;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> the red object

   <path style="fill:none;stroke:#000000;stroke-width:0.56444448000000003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> the sine wave

The sine wave in the PDF export has the same color of the green line.
The color is correct when changing any of these:
- change fill of red object to solid color
- change stroke color of red object to something other than black
- change stroke color of sine to something other than black
- change stroke-opacity of red object to e.g. 0.9

After some testing, I think this bug is caused by Cairo. (and has to do something with black (rgba=0,0,0,1) being the default color...)

Tags: exporting pdf
Revision history for this message
Johan Engelen (johanengelen) wrote :
Revision history for this message
Johan Engelen (johanengelen) wrote :
su_v (suv-lp)
tags: added: exporting
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.48+devel r9841 on OS X 10.5.8:
sine wave at the bottom left is colored green both with export based on cairo 1.8.10 and based on cairo 1.10.0 (using PDF 1.4 and 1.5)

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Johan Engelen (johanengelen) wrote :

It is a bug in cairo, see my bugreport here: https://bugs.freedesktop.org/show_bug.cgi?id=31140

Revision history for this message
Johan Engelen (johanengelen) wrote :

Fixed in Cairo: "It has been fixed in the git master and 1.10 branch so it will appear in the
1.10.2 (stable) and 1.11.2 (development snapshot) releases."

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

@Johan - if you use a cairo build from git master, any chance you could test if bug #514696 “group fill color is unset in PDF export in 0.47” is related to your reported issue and fixed with the new cairo version?

Revision history for this message
Johan Engelen (johanengelen) wrote :

I do not build Cairo myself, so cannot test without investing a lot of time.

Revision history for this message
madbiologist (me-again) wrote :

Cairo 1.10.2 has been released - see http://cairographics.org/news/cairo-1.10.2/

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

No longer reproduced with Inkscape 0.48+devel r10000 on OS X 10.5.8 using Cairo 1.10.2

Closing as 'Invalid' in Inkscape since the bug is in Cairo and fixed in its latest stable release.
Thx @Johan for investigating and reporting it upstream with cairo.

Changed in inkscape:
importance: Undecided → Medium
status: Confirmed → Invalid
Revision history for this message
su_v (suv-lp) wrote :
Changed in cairo:
status: Unknown → Fix Released
Changed in cairo:
importance: Unknown → Medium
Revision history for this message
su_v (suv-lp) wrote :

Note to Windows users:

Due to a regression in Inkscape 0.48.1 with cairo 1.10.2 (bug #707255), the official package (linked from inkscape.org) has been reverted to use the old version (cairo 1.8.8). If you need a newer version of cairo for better PDF export, consider installing the earlier 0.48.1-1 package still available on sf.net:

- cairo 1.8.8: Inkscape-0.48.1-2.exe
- cairo 1.10.2: Inkscape-0.48.1-1.exe
<http://sourceforge.net/projects/inkscape/files/inkscape/0.48.1/>

Revision history for this message
jazzynico (jazzynico) wrote :

Tested again with the latest gtk bundle (2.24.8). The PDF issue is fixed as expected, AND the regression found in bug #707255 is not reproduced anymore.

Changed in inkscape-devlibs:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

Fix confirmed on Windows XP with Inkscape r10938 and devlibs r27.

Changed in inkscape-devlibs:
status: Triaged → Fix Released
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.