GNOME Bugzilla – Bug 509909
Print Preview does not work
Last modified: 2009-05-16 18:00:00 UTC
Please describe the problem: I'm running Slackware 12 / linux. I've updated libraries and the program compiles and runs. The program prints without a problem, however, in the Print Dialog, the Print Preview button does not work correctly... Something is going on in the background, as a progress bar moves, but then a small popup box flashes for an eyeblink, and there is no print preview screen. Steps to reproduce: 1. Click the print preview button in the print dialog screen/window. 2. 3. Actual results: As described above: A progress bar moves, a popup box flashes, but no print preview. Expected results: I'd see the print preview :-) Does this happen every time? Yes, without fail :-( Other information: I have Kdevelop, and it does not ever get to print-preview.c, which is to say, if I set a breakpoint in print-preview.c, Kdevelop never stops. I can set a breakpoint in main.c and stop the program.
GTK+ does the preview, there is absolutely no code in GIMP involved.
As far as I know you need to have evince installed for the Preview functionality to work. But I'll leave it up to the GTK+ developers to deal with this.
GTK+ should probably provide a fallback in case that evince can not be launched. This could be as simple as opening a window with a close button and rendering the Cairo surface to it. I guess this could be written in a few lines of code. Actually we even had such code in the Print plug-in in GIMP at some point, but removed it in favor of using the default GTK+ print preview mechanism on all platforms.
gtk-print-preview-command is a setting so that desktop environments can set it to something suitable. evince is not hardcoded in GTK+. You can even set that setting in your gtkrc file.
IMO it would still be reasonable to provide a simple fallback so that print preview works without a third-party viewer installed. But it's up to the GTK+ team to decide this.