Bug 191614

Summary: Okular use incorrect DPI value
Product: [Applications] okular Reporter: Eugene Shalygin <eugene.shalygin+bugzilla.kde>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Use screen DPI when rendering PDF pages and calculating page size

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.