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 318285 - 100% view should match real size and take dpy into account
100% view should match real size and take dpy into account
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
0.4.x
Other All
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 343207 351397 375165 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-10-08 14:04 UTC by Sitsofe Wheeler
Modified: 2006-12-14 11:46 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch (4.04 KB, patch)
2006-12-06 13:49 UTC, Carlos Garcia Campos
none Details | Review

Description Sitsofe Wheeler 2005-10-08 14:04:07 UTC
Evince should take the monitor DPI into account when zooming pages to a percentage.

100% zoom in evince leaves documents (e.g.
http://www.adobe.com/products/acrobat/pdfs/pdfaccess.pdf ) looking a different
size to themselves at 100% in Acrobat 7. After some poking about I noticed that
this was because evince does not take the reported monitor DPI into account when
sizing documents against a percentage (xpyinfo reports 90x96 dots per inch ).
Forcing the DPI to 72 in Acrobat makes the documents look the same.
Comment 1 Nickolay V. Shmyrev 2005-12-29 17:13:46 UTC
True. We need corresponding poppler support, but evince should actually pass a value (72 or 96) to poppler.
Comment 2 Nickolay V. Shmyrev 2006-08-04 23:58:52 UTC
*** Bug 343207 has been marked as a duplicate of this bug. ***
Comment 3 Pascal de Bruijn 2006-08-05 10:12:05 UTC
Hi,

I filed bug 343207 on the Ubuntu launchpad. I want to mention that I have correctly set my DPI, I've measured my screen, and it turns out to have 98dpi.
Comment 4 Sitsofe Wheeler 2006-08-06 09:52:45 UTC
Most programs are dependent on X telling them the DPI because it is rare that the user will put a ruler to the screen.

Pascal: If xdpyinfo is giving you a DPI (significantly) different to what it should be this either an X/X driver/Bad monitor DDC issue and thus seperate from this bug.
Comment 5 Pascal de Bruijn 2006-08-06 10:03:13 UTC
Well xdpyinfo does return proper DPI information:

  dimensions:    1680x1050 pixels (431x272 millimeters)
  resolution:    99x98 dots per inch

Comment 6 Nickolay V. Shmyrev 2006-08-17 05:28:05 UTC
*** Bug 351397 has been marked as a duplicate of this bug. ***
Comment 7 Nickolay V. Shmyrev 2006-08-17 05:29:28 UTC
Please note, that other backends like dvi and djvu should render at correct size as well
Comment 8 Sitsofe Wheeler 2006-08-18 06:34:29 UTC
I'm not sure it's a good idea to change DPI -> dpy in the subject of this bug as I think it will make it harder to find. I'm not even sure what dpy stands for...
Comment 9 Carlos Garcia Campos 2006-11-14 16:35:14 UTC
*** Bug 375165 has been marked as a duplicate of this bug. ***
Comment 10 res 2006-11-15 16:13:39 UTC
(In reply to comment #1)
> True. We need corresponding poppler support, but evince should actually pass a
> value (72 or 96) to poppler.

Glancing at the code, it seems that poppler returns page metrics etc. in point (ie 1/72th of an inch). However, these metrics seem to be taken as-is as pixel values,  leading to an effective resolution of 72 dpi. So what needs to be done is probably to fix the point->pixel conversions to take the display resolution into account (ie 'metric_in_pixel = metric_in_pt * (screen_res / 72.0);').
Comment 11 Carlos Garcia Campos 2006-12-06 13:49:41 UTC
Created attachment 77812 [details] [review]
Patch

Here is a patch that I think fixes the problem. It adjusts the scale in ev-window according to screen dpi. We assume now that all the backends render at 72.0 dpi. 

Please, review it to make sure it really fixes the bug.
Comment 12 Carlos Garcia Campos 2006-12-14 11:46:50 UTC
Ok, I've just committed a slightly modified version of the patch.