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 599470 - Autorotate and center option in printing dialog
Autorotate and center option in printing dialog
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: printing
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 554451 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-10-24 08:51 UTC by Adrian Johnson
Modified: 2009-12-23 17:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set orientation of each page when printing (1.78 KB, patch)
2009-10-24 08:51 UTC, Adrian Johnson
committed Details | Review
Test document (9.68 KB, application/download)
2009-10-24 08:55 UTC, Adrian Johnson
  Details
autorotate and center patch (6.51 KB, patch)
2009-11-29 12:18 UTC, Adrian Johnson
none Details | Review
autorotate tooltip (1.11 KB, patch)
2009-12-05 10:54 UTC, Adrian Johnson
none Details | Review

Description Adrian Johnson 2009-10-24 08:51:42 UTC
Created attachment 146159 [details] [review]
Set orientation of each page when printing

When printing a landscape document the user needs to remember to select
landscape in the page setup otherwise landscape pages are scaled to a portrait
page. If the document contains mixed landscape/portrait pages it is not
possible to print it correctly. The entire document has to printed as portrait
or landscape.

The attached patch sets the orientation of each patch as it is printed.
Landscape pages are printed as landscape. Portrait pages are printed as
portrait. Mixed orientation documents are printed correctly and the user does
not need to remember to select landscape when printing a landscape page.

The downside is the user can no longer force printing to be all portrait or all
landscape. But generally this is not very useful. 99% of the time the user
wants the pages printed with the same orientation as used in the document.

It would be better if there was a user interface option in the printn dialog
for controlling this feature. Adobe reader has a "autorotate and center" check
box (enabled by default) that ensures portrait and landscape pages are always
printed correctly.

It would also be useful if evince could select the page size based on the
document page size so that documents with mixed pages sizes (A4, A3 etc) would
print correctly. But this should really be implemented with a user selectable
option (Adobe Reader has a "choose paper source by PDF page size" checkbox) so
I did not implement page size selection in this patch.
Comment 1 Adrian Johnson 2009-10-24 08:55:14 UTC
Created attachment 146161 [details]
Test document

Attaching a test PDF file I used for testing this patch. It contains mixed page sizes and page orientations.

I suggest printing to PostScript when testing this patch as printing landscape to PDF is broken (bug 599401).
Comment 2 Carlos Garcia Campos 2009-10-25 12:21:11 UTC
Review of attachment 146159 [details] [review]:

Committed to master and gnome-2-28 branch. Thanks!
Comment 3 Carlos Garcia Campos 2009-10-25 12:27:12 UTC
Leaving it open for the UI improvements suggested.
Comment 4 Marek Kašík 2009-10-29 14:12:24 UTC
Hi,

+	ev_document_get_page_size (op->document, page_nr,
+				   &width, &height);

the second parameter should be EvPage *, not gint.

Regards

Marek
Comment 5 Carlos Garcia Campos 2009-10-29 17:08:45 UTC
That's true for gnome-2-28 branch, not for master, so it's my fault, sorry. Good catch Marek, thank you!. It's fixed now:

http://git.gnome.org/cgit/evince/commit/?h=gnome-2-28&id=7ff0dbcf7a396eea2de03de59b8259e72908158f
Comment 6 Emmanuel Fleury 2009-11-01 10:28:08 UTC
*** Bug 554451 has been marked as a duplicate of this bug. ***
Comment 7 Adrian Johnson 2009-11-29 12:18:01 UTC
Created attachment 148684 [details] [review]
autorotate and center patch

Patch to add autorotate and center option to evince print settings tab.

Depends on patch in bug 599468.
Comment 8 Adrian Johnson 2009-12-05 10:54:39 UTC
Created attachment 149144 [details] [review]
autorotate tooltip

Add tooltip help for the autorotate option.
Comment 9 Carlos Garcia Campos 2009-12-23 17:22:33 UTC
Pushed to git master. I had to appy it manually and I've changed some minor things, so please, review it to make sure I haven't made any mistake.