GNOME Bugzilla – Bug 549859
"file" printer doesn't support n-up
Last modified: 2009-07-30 18:19:04 UTC
Steps to repro: 0) $ tests/print-editor 1) File->Print 2) Select "Print to File" printer 3) Change to Page Setup tab Actual results: The "Pages per side" and "Page ordering" options are insensitive. Expected results: Can select n-up and n-up page layout options.
Hmm actually I guess it's the gtkprintoperation that needs to implement support for this, for when the printer doesn't support it.
*** Bug 566218 has been marked as a duplicate of this bug. ***
*** Bug 571412 has been marked as a duplicate of this bug. ***
Created attachment 132339 [details] [review] Patch adding n-up printing capability for file backend. Hi, this patch add n-up printing capability for the file backend. It modifies GtkPrintOperation mainly. Should be tested with patch from the bug #420335 applied. Marek
Hmm, the patch worked great for the first few tries. Now I am getting a segfault as soon as I open the print dialog: GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed This comes from update_number_up_layout: if (priv->number_up_layout_n_option == NULL) { priv->number_up_layout_n_option = gtk_printer_option_set_lookup (set, "gtk-n-up-layout"); g_object_ref (priv->number_up_layout_n_option);
Created attachment 133931 [details] [review] Patch adding n-up printing capability for file backend. Hi, I fixed the problem with segfaults. I also changed choices for 2 pages per landscape sheet to "Top to bottom", "Bottom to top". This patch also enable multiple pages per sheet for lpr backend. Marek
Works pretty good in my testing with evince now. A number of things I noticed, maybe not directly the fault of this patch: - evince doesn't offer page reordering when printing to file, the gtk test print-editor does. - when printing to an actual printer, the evince print preview has a window title of evince_print.(null).93STTU. Obviously, something was NULL that evince didn't expect to be - but the window title should not show a temp filename in the first case... - page ordering is messed up. the number-on-a-page visualization in the print dialog gets it right, but the preview is wrong. e.g 6-up, lrtb comes out as 2 4 6 1 3 5 (the actual preview is turned 90° clockwise) Actually, page ordering doesn't seem to make any difference whatsoever, doing 6-up, tblr comes out just the same - even/odd is messed up too (I believe there are other reports about this). When doing 2-up, even only, I get a preview with [ 2 4 ] [ 6 8 ] ... which is even _pages_, not even _sheets_. The correct output would be: [ 3 4 ] [ 7 8 ] ... ie apply the even/odd filtering as the last step, after grouping pages into sheets.
*** Bug 390331 has been marked as a duplicate of this bug. ***
Seems that bug 340136 and bug 420335 are related to the issues I mentioned.
Matthias, are you trying with evince from git master? or have you patched it?
No, this was with evince 2.26.1.
Then, evince is not using this patch. Evince doesn't use gtk-print-operation yet. As soon as this patch is in, I'll push the changes needed in evince. See bug #557112.
Ah, thanks for letting me know. I'll repeat my testing with another app then.
With gedit, page reordering seems to work fine, and even/odd sheets also seem to do what I expect (for print-to-file, haven't tested cups). Cool. I'll have another look over the patch, but I think this is pretty much ready to go then.
Please commit.
commited: Add ability to print in number-up mode for file backend and lpr backendmaster GtkPrintOperation is now able to render multiple pages per sheet by its own. The most important changes are in these functions: * increment_page_sequence * prepare_data * common_render_page * print_pages_idle Patch also changes set of choices for 2 pages per sheet mode when landscape orientation is used to "Top to bottom" and "Bottom to top". Marek
The bug seems to have reappeared in a weird way. bug #590084 in evince has an illustration of what's happened