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 420335 - Page assignment when printing 4 pages to a sheet
Page assignment when printing 4 pages to a sheet
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
unspecified
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
: 449776 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-19 23:15 UTC by Andreas J. Guelzow
Modified: 2009-06-04 16:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (7.14 KB, patch)
2009-03-20 15:43 UTC, Marek Kašík
none Details | Review
actualized patch (4.03 KB, patch)
2009-05-19 15:29 UTC, Marek Kašík
reviewed Details | Review
new patch (2.95 KB, patch)
2009-05-25 12:15 UTC, Marek Kašík
accepted-commit_now Details | Review
modified patch (2.13 KB, patch)
2009-06-04 16:55 UTC, Marek Kašík
committed Details | Review

Description Andreas J. Guelzow 2007-03-19 23:15:34 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!!
Comment 1 Jack Tanner 2007-12-13 22:31:17 UTC
*** Bug 449776 has been marked as a duplicate of this bug. ***
Comment 2 Andreas J. Guelzow 2009-01-02 18:31:08 UTC
any progress on this?
Comment 3 Marek Kašík 2009-03-20 15:43:30 UTC
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
Comment 4 Matthias Clasen 2009-03-25 04:27:55 UTC
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.
Comment 5 Andreas J. Guelzow 2009-03-25 15:13:36 UTC
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.
Comment 6 Marek Kašík 2009-04-03 14:02:17 UTC
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
Comment 7 Marek Kašík 2009-05-19 15:29:48 UTC
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
Comment 8 Matthias Clasen 2009-05-23 02:12:40 UTC
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 ? 
Comment 9 Marek Kašík 2009-05-25 12:15:20 UTC
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
Comment 10 Matthias Clasen 2009-05-31 03:39:01 UTC
Looks better, please commit (even though what I had in mind was to replace all three rotation functions by direct calculations)
Comment 11 Marek Kašík 2009-06-04 16:55:41 UTC
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