GNOME Bugzilla – Bug 518052
Broken printing of graphics to inkjet on Windows.
Last modified: 2008-04-01 21:07:09 UTC
Please describe the problem: Cairo strokes are printed as a solid black box on a Canon inkjet printer (tested on Pixma iP5200R) on XP. Steps to reproduce: 1. Compile the attached program. 2. Run it, click the print button. 3a. Choose an inkjet printer and print; or 3b. Choose PDFCreator printer installed from http://www.pdfforge.org/ Actual results: You get a page with a solid black box Expected results: Get a page with a diagonal line, which is what you get when printing on a LaserJet. Does this happen every time? Yes. Other information: If you do not have an inkjet at hand, the problem can be reproduced by printing to PDFCreator from www.pdfforge.org.
Created attachment 105753 [details] testcase This illustrates the problem.
See also Bug 424622.
Maybe this will get better with Cairo 1.6 and its cairo_win32_printing_surface, as announced in Bug 488833.
I can indeed reproduce the problem exactly. (HP LaserJet 1010 vs. Canon iP5200 inkjet.)
The cairo_win32_surface does not work for printing. Use cairo_win32_printing_surface instead. The difference is win32_surface requires access to the destination DC bitmap for compositing antialiased fills, strokes, and translucent colors. Most printer drivers do not support a destination DC that can be read and even if it does you would end up sending raster images to the printer. The win32_printing_surface uses the GDI fill and stroke functions as antialiasing is not required at printer resolutions. Fallback images are used to support transparency.
Created attachment 108438 [details] PDF created with trunk I committed support for cairo_win32_printing_surface in bug #488833 and now the test program attached to this bug appears to work correctly. Here is the output I get from PDFCreator. I'm closing this bug as FIXED.