After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347125 - gtk-demo printing gives wrong results on win32
gtk-demo printing gives wrong results on win32
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.10.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-07-10 18:27 UTC by Erik van Pienbroek
Modified: 2008-02-27 13:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch against printing.c to fix described problem (473 bytes, patch)
2006-07-10 18:28 UTC, Erik van Pienbroek
committed Details | Review
Wrong results on win32 (created with Adobe Acrobat Printer) (13.79 KB, application/pdf)
2006-07-10 18:31 UTC, Erik van Pienbroek
  Details
Headers are black filled rectangles (42.51 KB, application/pdf)
2007-03-26 01:24 UTC, Andreas Köhler
  Details

Description Erik van Pienbroek 2006-07-10 18:27:43 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:
Comment 1 Erik van Pienbroek 2006-07-10 18:28:26 UTC
Created attachment 68731 [details] [review]
patch against printing.c to fix described problem
Comment 2 Erik van Pienbroek 2006-07-10 18:31:12 UTC
Created attachment 68734 [details]
Wrong results on win32 (created with Adobe Acrobat Printer)
Comment 3 Andreas Köhler 2007-03-26 01:22:30 UTC
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?
Comment 4 Andreas Köhler 2007-03-26 01:24:04 UTC
Created attachment 85283 [details]
Headers are black filled rectangles
Comment 5 Dominic Lachowicz 2008-02-22 22:39:08 UTC
Patch applied to SVN.
Comment 6 Sven Neumann 2008-02-25 14:59:04 UTC
Shouldn't this report be closed as FIXED then?
Comment 7 Dominic Lachowicz 2008-02-25 15:09:00 UTC
(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.
Comment 8 Bastiaan 2008-02-27 09:05:56 UTC
(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.