Opaque radial gradients cause PDFs to fail to open in Adobe Reader

Bug #681512 reported by Hiroshi Saito on 2010-11-25
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
Critical
Krzysztof Kosinski
cairo (Ubuntu)
Undecided
Unassigned

Bug Description

Inkscape version: 0.48.0 r9654
OS: ubuntu 10.10

Detail:
Radial gradient with opaque head and tail stops breaks PDF.
Evince says "Error (95): ExtGState 's6' is wrong type", when I open the PDF.
Adobe Reader 9.4 cannot open the document.

Steps to reproduce the bug:
1. Create a circle or square.
2. Set "fill" of the circle to radial gradient.
3. Edit the gradient. Set alpha value of head and tail stops to 255.
4. Save as PDF1.4 with no other options.

I can confirm this. This might be an issue with the 1.10.0 version of Cairo supplied with Ubuntu Maverick. There were some changes related to radial gradients in that release.

summary: - Specific radial gradient breaks exported PDF
+ Radial gradients cause PDFs to fail to open in Adobe Reader
Changed in inkscape:
status: New → Confirmed
importance: Undecided → Critical

It is a bug in cairo 1.10.0. It has been fixed in git.

su_v (suv-lp) wrote :

Duplicate of Bug #672686 “Some diagrams results in "Illegal character" in the generated pdf”?

tags: added: cairo exporting pdf
Krzysztof Kosinski (tweenk) wrote :

Bug #672686 is different but they would probably both be fixed by using a more recent Cairo.

This bug does not appear if I use Cairo master, which means it's indeed a Cairo issue in Ubuntu. Adding affects.

summary: - Radial gradients cause PDFs to fail to open in Adobe Reader
+ Opaque radial gradients cause PDFs to fail to open in Adobe Reader
Krzysztof Kosinski (tweenk) wrote :

Here's something interesting:

If I download Ubuntu's source package, configure with no arguments, build and install, this bug does not appear. However, when I build the package using the Debian build system, it DOES appear.

What's going on here?

su_v (suv-lp) wrote :

> Error (104): ExtGState 's6' is wrong type

Console message from Inkscape when importing the PDF file exported following the 'steps to reproduce'
tested with Inkscape 0.48+devel r9926 on OS X 10.5.8
dependencies installed via MacPorts: cairo 1.10, poppler 0.14.5

If there is an additional text object in the SVG, I get additionally the 'Illegal character .. ' errors as well (as mentioned in comment #9 of bug #672686). Still think these two bugs are about the same gradient issue.

> Bug #672686 is different but they would probably both be fixed by using a more recent Cairo.

Bug #672686 is the same. I don't know why poppler prints "Illegal character" but it is probably confused by the missing ExtGState.

If I build cairo 1.10.0 I can reproduce the bug. If I apply the patch:
http://cgit.freedesktop.org/cairo/commit/?id=7a17ef31760c49b81fd2890814f5b2aeb8c6b3a3
the PDF displays correctly and no errors are reported. ie both the ExtGState and Illegal character issues are fixed.

su_v (suv-lp) wrote :

Addendum: no other poppler-based PDF viewer nor Adobe Reader installed to test; Apple's Preview.app reports the same error as mentioned in bug #672686 comment #4 when opening the PDF, but renders it as expected.

Preview.app console messages:
Notice encountered unexpected object type: 7.
Notice missing or invalid object number.

su_v (suv-lp) wrote :

@Krzysztof - if this cairo bug is critical to Inkscape's internal rendering in the not yet merged Inkscape cairo branch (lp:~tweenk/inkscape/gsoc-cairo) - is there no way to track bug importance separately for the two branches (trunk and gsoc-cairo)?

Proposing to lower bug importance to 'Medium' - AFAIU there is nothing here that could be fixed in Inkscape's code, it only affects export to PDF of opaque gradients - and link it as duplicate to bug #672686 (or the other way round).

Krzysztof Kosinski (tweenk) wrote :

The bug is critical or at least high importance to all branches of Inkscape, because it makes PDFs exported from Inkscape unusable in non-Poppler PDF readers - regardless of what is used for on-screen rendering. Exporting PDFs is what you do when you want a large poster printed out, and because of this bug you will have a nasty surprise when it turns out the PDF won't open at the print shop. It almost made me miss deadlines twice before I tracked it down.

The bug is not related to the cairo branch at all. It's basically "Invalid" for Inkscape since it's not our bug, but it's still very severe. I don't know how to otherwise bring this issue to the attention of Ubuntu packagers.

su_v (suv-lp) wrote :

Krzysztof wrote
> I don't know how to otherwise bring this issue to the attention of Ubuntu packagers.

Latest activity in the other report for Inkscape (bug #672686) about the same Cairo bug:
<https://bugs.launchpad.net/inkscape/+bug/672686/comments/12>

Can we link this as duplicate to bug #672686 now (see comment #7)?

madbiologist (me-again) wrote :

This bug has been fixed in cairo 1.10.2 - see http://cairographics.org/news/cairo-1.10.2/

Changed in cairo (Ubuntu):
status: New → Fix Committed
madbiologist (me-again) wrote :

The abovementioned cairo 1.10.2 is included in Natty.

Changed in cairo (Ubuntu):
status: Fix Committed → Fix Released

I get a similar problem with "mirror" gradients in Fedora 15 which has Cairo 1.10.2.
Its not super easy to repeat because it seems to depend on whic gradients are under the mirror gradient.

su_v (suv-lp) wrote :

@joakim - 'mirror' gradients as in 'reflected' or 'repeated' gradients in Inkscape? See bug #511791 (and the first report of the issue in bug #168610 - the problem with 'dart.svg', currently comment #61 ff).

Krzysztof Kosinski (tweenk) wrote :

This should be fixed in the Windows port as well, as I have updated the devlibs to Cairo 1.11.2 required by the Cairo renderer.

Changed in inkscape:
assignee: nobody → Krzysztof Kosinski (tweenk)
su_v (suv-lp) wrote :

@Krzysztof - can we close this report as 'Invalid' for Inkscape now? Stable cairo 1.10.2 had been released more than one year ago on 2010-12-25.

madbiologist (me-again) wrote :

Ubuntu does not track bugs in the Windows port of Inkscape.

Changed in inkscape:
status: Confirmed → Invalid
su_v (suv-lp) wrote :

madbiologist wrote:
> Ubuntu does not track bugs in the Windows port of Inkscape.
>
> Changed in inkscape:
> status: Confirmed → Invalid

@madbiologist - that's the wrong reason to close this report: Inkscape's bug tracer is certainly _not_ limited to Inkscape on Ubuntu (there's a separate tracker for Ubuntu-specific Inkscape bugs: <https://launchpad.net/ubuntu/+source/inkscape>).

madbiologist (me-again) wrote :

OK, good point (I assume you meant https://bugs.launchpad.net/ubuntu/+source/inkscape ).

According to Krzysztof in comment #16 this should be fixed in Inkscape on Windows too. Can you confirm? Also, am I understanding correctly that the bug on Windows in actually in Cairo, not in Inkscape, just like on Linux?

su_v (suv-lp) wrote :

@madbiologist - see comment #10 (this report was neither kept open nor marked as 'Critical' in Inkscape because of the Windows port of Inkscape, but because of Ubuntu apparently being late with updating cairo). From my POV it is ok to close it as 'Invalid' - Cairo 1.10.0 had been released 15 months ago, bug #672686 (about the same cairo issue) had been closed early last year, Inkscape's official packages for Windows and Mac OS X include newer versions of cairo, and the reported issue was never about a bug in Inkscape's code anyway.

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

Duplicates of this bug

Other bug subscribers