PDF export fails with reflected gradients

Bug #511791 reported by John M. Dlugosz
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
High
Unassigned
Inkscape Devlibs
Fix Released
High
Unassigned

Bug Description

This file gives bizarre and unusable results when exported as a PDF. In fact, I could not get any kind of export to work.

Revision history for this message
John M. Dlugosz (john-dlugosz) wrote :
Revision history for this message
John M. Dlugosz (john-dlugosz) wrote :
su_v (suv-lp)
tags: added: exporting pdf
Revision history for this message
su_v (suv-lp) wrote :

I guess this happened with:
> Inkscape 0.47, your downloaded binary for Windows.
> Windows XP Pro x64 edition, up-to-date.

Please add this basic information to each report you make or - if your report is a follow-up - at least add a reference to the one which has full information about OS and Inkscape version.

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

reproduced with Inkscape 0.47 r22583 on OS X 10.5.8

Inkscape finally crashed after creating a ~86 MB Preview PDF file in $TMP, the result is not viewable with the default PDF viewer on OS X.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

this could be a known bug in cairo with 'reflected' gradients as are present in the pasted image of the instrument, see <https://bugs.launchpad.net/inkscape/+bug/168610/comments/37>

related SVG snippet from 'Daniel-1.svg':

    <linearGradient
       inkscape:collect="always"
       xlink:href="#linearGradient52391"
       id="linearGradient59734"
       gradientUnits="userSpaceOnUse"
       gradientTransform="matrix(1.47809,-2.91997e-7,-2.55438e-8,1.39842,-912.003,-588.221)"
       spreadMethod="reflect"
       x1="2220.6755"
       y1="714.09113"
       x2="2230.2859"
       y2="714.09113" />
    <linearGradient
       id="linearGradient52391">
      <stop
         style="stop-color: rgb(113, 71, 0); stop-opacity: 1;"
         offset="0"
         id="stop52393" />
      <stop
         style="stop-color: rgb(255, 255, 255); stop-opacity: 1;"
         offset="1"
         id="stop52395" />
    </linearGradient>

tags: added: cairo gradient
Revision history for this message
su_v (suv-lp) wrote :

Correction: my previously reported export file size was wrong: exporting a reduced variant of the drawing (without the cloned lines) to PDF (with default export options) resulted in a 820.4 MB sized PDF file.

Changed in inkscape:
importance: Undecided → High
Revision history for this message
su_v (suv-lp) wrote :

Attaching a variant of 'Daniel-1.svg' that exports without issues to PDF with Inkscape 0.47 on OS X 10.5.8 - after replacing every gradient repeat option 'Reflected' with 'None'. The rendering of the rods and keys of the saxophone is slightly changed - if needed, one could work around this bug by using gradients with multiple stops to imitate the 'reflected' gradients.

su_v (suv-lp)
summary: - PDF export (etc) doesn't work
+ PDF export fails with reflected gradients
Revision history for this message
su_v (suv-lp) wrote :

Issue still present with Inkscape 0.48+devel r10000 on OS X 10.5.8, using cairo 1.10.2

$ inkscape -z Daniel-1.svg -A Daniel-1.pdf

still produces a PDF file with a file size of 820.4 MB (860'203'110 bytes).

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape 0.48.1.
Not reproduced with trunk revision 10466.

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

PDF file attached to comment #10 was created with:
   cairo 1.11.2 (http://cairographics.org)

AFAICT the result depends on the cairo version:

LeWitt:bug suv$ ll 511791-Daniel-1-r10673-cairo-*
-rw-r--r-- 1 suv staff 860203097 Jul 19 14:26 511791-Daniel-1-r10673-cairo-1_10_2.pdf
-rw-r--r-- 1 suv staff 430195 Jul 19 14:27 511791-Daniel-1-r10673-cairo-1_11_2.pdf
LeWitt:bug suv$

(issue reproduced with latest stable cairo 1.10.2, but not with unstable cairo-snapshot 1.11.2;
tested same revision of Inkscape trunk, Mac OS X 10.5.8 (i386))

Revision history for this message
jazzynico (jazzynico) wrote :

> AFAICT the result depends on the cairo version.

Yes, that's the reason why I didn't close the report. Even if it's a Cairo bug, I'm a bit reluctant to close it "Invalid", and waiting until everyone uses the fixed official Cairo version could take years. I guess we could just close it when it is released...

Revision history for this message
jazzynico (jazzynico) wrote :

Will be fixed for Windows in 0.48.3 (cairo 1.11.2) and the trunk.

Changed in inkscape:
status: Confirmed → Triaged
Changed in inkscape-devlibs:
importance: Undecided → High
status: New → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

> New → Fix Released

JFTR: The official Inkscape Inkscape package for Mac (0.48.2, upcoming 0.48.3) ship with current stable cairo 1.10.2 (that's the current version of cairo in MacPorts, used for packaging on Mac OS X).

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

*face-palm*

(sorry for wrongly commenting on a status change in the Windows devlibs)

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

Closing as 'Invalid' for project 'Inkscape' since this was an upstream bug in earlier cairo releases which got fixed in unstable cairo snapshot >= 1.11.2 and stable cairo release 1.12. All latest stable release packages of Inkscape for Windows and Mac OS X include newer versions of cairo which are no longer affected.

Please reopen if you think this report was closed in error.

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