Bug 17283 - Cairo produces broken PDF for gradients
Summary: Cairo produces broken PDF for gradients
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: pdf backend (show other bugs)
Version: 1.6.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Adrian Johnson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-24 23:12 UTC by Christian Mertes
Modified: 2008-09-15 12:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
example of broken pdf (1.86 KB, application/pdf)
2008-08-24 23:12 UTC, Christian Mertes
Details

Description Christian Mertes 2008-08-24 23:12:24 UTC
Created attachment 18489 [details]
example of broken pdf

When using Cairo to generate PDF files containing a colour gradient, the resulting file is broken. Including it with pdflatex produces strange results like a shrunken font size for the rest of the page and a wrong placement of the figure.

pdf2ps prints the following error which might be a helpful hint for someone who doesn't know as little about pdf as I do:

   **** Warning: File has imbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by: 
   **** >>>> cairo 1.6.0 (http://cairographics.org) <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

I attached a simple example file generated by gnumeric. The only other software I tried was inkscape which produces the same error. If there are possibilities to use colour gradients without running into this error then I didn't find them.

Unfortunately I cannot easily try out Cairo 1.7 but I guess you know whether you already fixed this bug or not.
Comment 1 Christian Mertes 2008-08-24 23:31:40 UTC
I just found out that it actually *is* possible to use a gradient without provoking this error message. That is, if you choose a gradient that includes a colour with an alpha channel < 1.0, the error disappears.
Comment 2 Adrian Johnson 2008-09-05 03:46:55 UTC
This was fixed shortly after the 1.6.4 release with this commit:

http://gitweb.freedesktop.org/?p=cairo;a=commit;h=5e102b06d1a3c62a1dd0f381fbd1123961bebdf8

Comment 3 Christian Mertes 2008-09-15 12:49:57 UTC
I'm glad to hear it had already been fixed. Thanks a lot :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.