GNOME Bugzilla – Bug 592582
Print preview doesn't reflect the printout
Last modified: 2009-10-26 16:52:52 UTC
Created attachment 141330 [details] [review] a patch generating correct print preview Print preview shows input document without applying settings from 'General' or 'Page Setup' tab. Steps to reproduce: 1. run gtk-demo -> Printing 2. change Pages, Copies, Collate, Reverse, Pages per Side, Page Ordering or Scale 3. press Print Preview Actual results: the document without any change Expected result: something similar to the printout patch is attached Marek
*** Bug 347569 has been marked as a duplicate of this bug. ***
*** Bug 594026 has been marked as a duplicate of this bug. ***
The one question I have here is what happens if you then go to print that preview from evince ? Will that turn a 4-up document into a 16-up one ? Since we are already passing the print settings to evince...
Hi Matthias, yes, you are right it print the preview as 16-up. I'll look at it. Marek
Created attachment 143695 [details] [review] modified patch generating correct print preview This patch changes print settings sent to the preview so that they won't be applied again. Marek
Can you explain that unify_values business to me ? That looks a bit fishy to me, and I am not confident that it will really work. Looking at an example settings .ini file, I see cups-Duplex=None duplex=simplex so, some translation will be necessary for both the key names (case differences) and the values.
Created attachment 145612 [details] [review] modified patch showing correct print preview Hi Matthias, the function "unify_values" was about setting same values for cups-* settings as for standard setting. If a cups-* setting is present in a key file it is used for print even if there is the same setting without "cups-" (it has higher priority). I decided to remove such settings (cups-reverse, cups-page-set, cups-scale, cups-number-up and cups-number-up-layout) by gtk_print_settings_unset() to avoid problems with translation of values and keys. Regards Marek
The removal of cups- keys looks like a reasonable approach. Might be good to add a comment there, explaining why it is done. I'm stil not 100% convinced that this is the right approach (I would seem more natural to me if evince in its preview mode would interpret these print settings itself). But I am ok with taking this patch now.
Committed: Show correct print preview Modify print preview according to settings from print dialog. Similar approach as during real print is applied to the preview process (#592582). Marek