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 734788 - Center option doesn't work when printing with a manual scale
Center option doesn't work when printing with a manual scale
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: printing
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-14 12:21 UTC by Carlos Garcia Campos
Modified: 2015-02-04 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
print-operation: Fix centering of documents when printing with a manual scale (4.88 KB, patch)
2014-08-14 12:23 UTC, Carlos Garcia Campos
committed Details | Review
centered scaled printing, take 2 (2.23 KB, patch)
2014-11-12 19:44 UTC, Leo Wolf
none Details | Review
Patch (5.40 KB, patch)
2015-01-28 10:03 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2014-08-14 12:21:39 UTC
Try to print a document with page scale none (or shrink to printable area if the document fits in paper), with the autorotate and center option enabled, and using a manual scale less than 100% (in the second tab). The document is not correctly centered as expected.
Comment 1 Carlos Garcia Campos 2014-08-14 12:23:15 UTC
Created attachment 283381 [details] [review]
print-operation: Fix centering of documents when printing with a manual scale

Adrian, could you please review this patch?
Comment 2 Adrian Johnson 2014-08-15 07:06:06 UTC
Looks good.
Comment 3 Carlos Garcia Campos 2014-08-15 08:02:40 UTC
(In reply to comment #2)
> Looks good.

Thanks!
Comment 4 Carlos Garcia Campos 2014-08-15 08:02:58 UTC
Comment on attachment 283381 [details] [review]
print-operation: Fix centering of documents when printing with a manual scale

Pushed to both branches
Comment 5 Leo Wolf 2014-11-12 19:44:11 UTC
Created attachment 290542 [details] [review]
centered scaled printing, take 2

Hmm, I think you want cairo_device_to_user_distance in this case.  And apparently, the landscape case needs to be considered separately.  With this patch (on top of current evince) everything appears where it should be, and not somewhere outside the paper.
Comment 6 Leo Wolf 2014-11-12 20:29:53 UTC
Yeah OK, this doesn't work either. (scaling down https://app.box.com/s/l59dzndwvq9wp2ter478 to A4.)  And all I wanted was to print a PDF.  I'm out, sorry.
Comment 8 Carlos Garcia Campos 2015-01-28 08:31:03 UTC
Reopening, since I've reverted the patches. See bug #739723
Comment 9 Carlos Garcia Campos 2015-01-28 10:03:51 UTC
Created attachment 295626 [details] [review]
Patch

This patch merges my original commit with the fixes by Leo. It also bumps the required GTK+ version to make sure GTK+ is doing what we expect. It works for me in all the cases I've tried, could you guys confirm this works for you as well?
Comment 10 Leo Wolf 2015-01-30 12:42:13 UTC
Yes, this works for me.  GTK+ 3.14.6 is also doing the right thing, if you want to apply this to the 3.14 branch as well.  Thank you!
Comment 11 Marek Kašík 2015-02-04 14:55:30 UTC
I'm sorry that I'm so late. I've just tested this and it works for me too. Thank you.