GNOME Bugzilla – Bug 599470
Autorotate and center option in printing dialog
Last modified: 2009-12-23 17:22:33 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.
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).
Review of attachment 146159 [details] [review]: Committed to master and gnome-2-28 branch. Thanks!
Leaving it open for the UI improvements suggested.
Hi, + ev_document_get_page_size (op->document, page_nr, + &width, &height); the second parameter should be EvPage *, not gint. Regards Marek
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
*** Bug 554451 has been marked as a duplicate of this bug. ***
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.
Created attachment 149144 [details] [review] autorotate tooltip Add tooltip help for the autorotate option.
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.