Bug 191614 - Okular use incorrect DPI value
Summary: Okular use incorrect DPI value
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-04 21:08 UTC by Eugene Shalygin
Modified: 2010-12-18 12:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Use screen DPI when rendering PDF pages and calculating page size (2.77 KB, patch)
2010-12-18 12:33 UTC, Eugene Shalygin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2009-05-04 21:08:53 UTC
Version:            (using Devel)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Compiled sources

Okular calculates scale incorrectly for PDF and PS files. The scale that it calls "100%" is "66.(6)%" actually, and "133%" is actual "100%" scale. Checked on files produced by LaTeX, my fonts DPI is 96.

Evince (and acroread) works fine. And DVI backend, for example, works fine in Okular
Comment 1 Pino Toscano 2009-06-09 02:50:15 UTC
SVN commit 979129 by pino:

Use the starting screen X/Y DPI values for calculating the page sizes, using the real values instead of the Xrdb values.
BUG: 191614


 M  +25 -18    generator_pdf.cpp  
 M  +2 -0      generator_pdf.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=979129
Comment 2 Eugene Shalygin 2010-12-18 12:33:59 UTC
Created attachment 55042 [details]
Use screen DPI when rendering PDF pages and calculating page size 

Since fix for this bug was deleted from sources, I propose to return it back with additions. From my point of view, the problem with bug 204386 and the fix of this bug that was existing before is that Okular::Page has only one size property -- size on screen. While actually it should have two: size on screen (in pixels) and real size (inches, millimiters..). If screen point is not equal to typographic one, measuring sizes in such points causes problems.

To workaround this, I propose to add "Pixels" to enum PageSizeMetric and use it for PDF pages together with returning previous fix.