GNOME Bugzilla – Bug 347125
gtk-demo printing gives wrong results on win32
Last modified: 2008-02-27 13:28:50 UTC
Please describe the problem: With the gtk-demo bundled with gtk 2.10.0 I get incorrect results on win32. The attached pdf shows the result. This problem caused by a missing function call in the do_printing function (printing.c). The docs of GtkPrintOperation's 'draw-page' signal ( http://developer.gnome.org/doc/API/2.0/gtk/gtk-High-level-Printing-API.html#GtkPrintOperation-draw-page ) mention the following : Use gtk_print_operation_set_use_full_page() and gtk_print_operation_set_unit() before starting the print operation to set up the transformation of the cairo context according to your needs. After adding the instruction gtk_print_operation_set_unit(operation, GTK_UNIT_POINTS); before the gtk_print_operation_run() call, the problem goes away (behaviour on Linux stays the same). To fully comply with the documentation I've attached a patch against printer.c which adds the two mentioned API calls. Steps to reproduce: 1. Use the printing part of gtk-demo on win32 2. 3. Actual results: See attached PDF Expected results: Normal readable text Does this happen every time? Yes Other information:
Created attachment 68731 [details] [review] patch against printing.c to fix described problem
Created attachment 68734 [details] Wrong results on win32 (created with Adobe Acrobat Printer)
The patch looks good, please apply it in demos/gtk-demo. Using PDFCreator, the page headers are black filled rectangles (instead of gray?), see the next attachment. Is that a cairo, gtk+ or pdfcreator bug?
Created attachment 85283 [details] Headers are black filled rectangles
Patch applied to SVN.
Shouldn't this report be closed as FIXED then?
(In reply to comment #6) > Shouldn't this report be closed as FIXED then? Comment #3 says that "the page headers are black filled rectangles (instead of gray?), see the next attachment." I haven't manually verified that the problem is gone.
(In reply to comment #7) > (In reply to comment #6) > > Shouldn't this report be closed as FIXED then? > > Comment #3 says that "the page headers are black filled rectangles (instead of > gray?), see the next attachment." > > I haven't manually verified that the problem is gone. This is due to another bug, which has been reported separately as bug 518052. So it should be safe to close this one.