Comment 0 for bug 1078430

Revision history for this message
su_v (suv-lp) wrote : Incorrect import of partially transparent gradients from PDFs created with cairo >= 1.12.4

Follow-up report to
Bug #985206 “PDF output different than SVG source (cairo >= 1.11.2)”

Inkscape (as well as poppler-cairo) fail to correctly convert partially transparent gradients to SVG from PDF files which have been created with Inkscape (stable or trunk) and cairo >= 1.12.4 by saving the attached SVG file as PDF, or printing to file (PDF) via GTK+ print dialog.

Steps to reproduce:
0) install cairo 1.12.8
1) open attached SVG file in Inkscape (stable or trunk)
2) save a copy as PDF (1.4, page area)
3) open just created PDF file in Inkscape (default PDF input extension)

Expected result:
The gradient fills in original SVG and opened PDF look identical (or at least very similar).

Actual result:
The gradient fills are displaced and partially clipped off.

Export (SVG -> PDF):
PDF export with cairo 1.12.4, 1.12.6 and 1.12.8 was tested on OS X 10.7.4 (64bit) with GTK+/Quartz builds of Inkscape 0.48.3.1 and Inkscape 0.48+devel r11871.
PDF export with older versions of cairo (<= 1.12.2) was tested with all official Mac OS X Inkscape packages (>= 0.47, cairo 1.8.8, 1.8.10 and 1.10.2), with local builds on Mac OS X 10.5.8 (32bit) (cairo 1.10.2 (X11), cairo 1.11.4 (Quartz)) and OS X 10.7.4 (64bit) (cairo 1.12.2 (X11)), and on Ubuntu 12.10 (64bit, VM) (cairo 1.12.2).

Import (PDF -> SVG):
Incorrect PDF import was reproduced on Mac OS X 10.5.8 (32bit), OS X 10.7.4 (64bit) and Ubuntu 12.10 (64bit, VM) with:
- Inkscape stable (0.47-0.48.3.1, various cairo and poppler versions)
- Inkscape trunk r11871 (default PDF input extension) [*]
- Inkscape trunk r11871 (experimental PDF via poppler-cairo input extension)
- PDF -> SVG using pdftocairo (from poppler 0.20.4, 0.20.5)
[*] poppler versions don't seem to affect the result (same import with poppler 0.16.6, 0.16.7, 0.18.4, 0.20.4 and 0.20.5)

Notes:
1) Viewing the PDF exported with Inkscape and cairo 1.12.8:
- Evince 2.30.3 (OS X), 3.6.0 (Ubuntu 12.10), Xpdf 3.02 (OS X), Ghostscript 9.06 (Ubuntu 12.10) and Apple's Preview.app (OS X) render the gradients as expected (i.e. like the original SVG)
- Xpdf 3.03 on Ubuntu segfaults
- Ghostscript 9.05 on OS X renders solid fill colors instead of the gradient fills
2) import (PDF -> SVG) via poppler-cairo (external, or with trunk's input extension) results in a different but also incorrect gradients (compared to Inkscape's default PDF import routine).
3) Results with PDFs created outside of Inkscape with librsvg 2.36.4 (cairo 1.12.8):
Broken import not reproduced with:
- Inkscape stable and trunk (default PDF input extension)
Broken import partially reproduced with:
- Inkscape trunk r11871 (experimental PDF via poppler-cairo input extension)
4) Reported issue was not reproduced with fully opaque gradients.