GNOME Bugzilla – Bug 420335
Page assignment when printing 4 pages to a sheet
Last modified: 2009-06-04 16:56:36 UTC
When printing 4 landscape pages to a sheet using the gtkprintoperation, the print dialog shows 1 2 3 4 but the real printing is 2 4 1 3 That is not what any user will desire!!
*** Bug 449776 has been marked as a duplicate of this bug. ***
any progress on this?
Created attachment 131034 [details] [review] a patch Hi, the patch adds a rotation of number-up-layout to CUPS backend. It rotates the layout according to selected page orientation. The patch also changes choices for 2 pages per sheet option in landscape orientation to ["Top to bottom", "Bottom to top"]. Regards Marek
Do we also need to fix the rendering on the page setup tab ? In my testing (without the patch), I see the n-up preview rendering change its orientation (sometimes portrait, sometimes landscape), as I change the number of pages per side.
I would say that the page setup dialog correctly shows the desired allocation of the logical pages to the physical sheets. I don't think what the page setup dialog shows should change. THe printing should match what is shown in the dialog.
Hi, I wouldn't change the layout preview (preview, showing 6 pages per sheet, should be rotated -90 degrees in such a case). I would add dimensions of selected paper + change proportions of the preview according to paper size + show margins. - it looks like a new feature request :) Marek
Created attachment 134954 [details] [review] actualized patch Hi, actualized patch is attached. It doesn't contain the ["Top to bottom", "Bottom to top"] part (it is already in GIT). The layout preview is going to be changed by fix of the bug #551409. Marek
I have a suspicion that the rotate-by-a-multiple-of-90 functions could probably coded a little more elegantly by sorting the 8 orientations into two cycles of length four and doing some modulo 4 arithmetic. But not a big deal. + if (enum_value != NULL) + gtk_print_settings_set (settings, "cups-number-up-layout", enum_value->value_nick); Can enum_value actually be NULL here ?
Created attachment 135313 [details] [review] new patch Hi Matthias, I rewrote the rotation to be more elegant. The enum_value can be NULL only in the case when enum_class == NULL which is not probable since the class is written correctly. I removed the test. Marek
Looks better, please commit (even though what I had in mind was to replace all three rotation functions by direct calculations)
Created attachment 135959 [details] [review] modified patch Hi, I committed modified patch. It changes calling of those three functions to the direct computations. I tested it. Marek