Bug 204386 - okular reports wrong pdf paper size
Summary: okular reports wrong pdf paper size
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 204864 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-19 11:07 UTC by Christopher Schwan
Modified: 2010-01-29 16:12 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Schwan 2009-08-19 11:07:30 UTC
Version:            (using KDE 4.3.0)
Compiler:          gcc version 4.3.2 (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 
OS:                Linux
Installed from:    Gentoo Packages

Okular shows (File -> Properties) an incorrect paper size of pdf documents, for example all my A4 documents have a dimension of "280 x 396 mm" - this should be 210 x 297 millimeters.

Example file:
http://www.tex.ac.uk/tex-archive/help/uk-tex-faq/newfaq.pdf
Comment 1 Albert Astals Cid 2009-08-24 00:58:36 UTC
Probably has something to do with pino changes to deal with dpi of the screen as i'm getting a different paper size too, Pino any idea at what level fix this problem?
Comment 2 Gabi Sarkis 2009-08-25 15:02:48 UTC
I have a similar issue on my laptop where I use the ATI binary driver and connect an external monitor once in a while. When I only use the internal screen, PDF files (only PDF; PS, DVI, EPS worked) would be vertically stretched in okular and gv (xpdf and evince were fine) when I use a natural (as opposed to pixel based) scale. 
I ran "xdpyinfo | grep dot" and found out that my screen was configured by the driver to have 96x48 DPI. The problem was fixed by specifying the physical monitor dimensions in xorg.conf and the size of the 100% view on the screen was very close to the actual paper. I haven't tried to connect the external monitor since, but I think I'll have to tinker with xorg.conf again when that happens.
It would be nice to have the option to use a pixel based scale in okular like in gv.
Comment 3 Gabi Sarkis 2009-08-25 15:25:20 UTC
(In reply to comment #2)
I guess I was trying to say that the DPI settings were the culprit since the PDF size also changed when I changed them. The detailed reply was meant for bug 204864 which I think is related to this one.

With the xorg.conf set to 96x96 DPI an A4 paper was reported by okular to be 279.87mm x 396.052mm. With the DPI set to 125x125 (corresponding to the physical monitor size and resolution) okular reported the size as 364.4mm x 515.7mm, but the paper width on screen @ 100% zoom matched the physical paper size. evince reported the proper size at both DPI settings and displayed the PDF with the correct width @100% zoom for 125DPI.
Comment 4 Daniel Heinrich 2009-08-27 11:10:41 UTC
I can confirm this bug with my setup. Okular says the example file's size is 259.584 x 367.125 mm.

I'm using Okular 0.9 (KDE 4.3.00) installed from the kubuntu ppa at http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu
Kubuntu 9.04, okular package version 4:4.3.0-0ubuntu1~jaunty1~ppa1

I also have an ati gpu using a dual screen setup with xrandr
Comment 5 Pino Toscano 2009-08-27 12:14:43 UTC
*** Bug 204864 has been marked as a duplicate of this bug. ***
Comment 6 Pino Toscano 2009-08-27 12:15:58 UTC
@Albert: yes, it is.

No time to fix it before KDE 4.3.1, will (temporarly) force 72 DPI again.
Comment 7 Pino Toscano 2009-08-27 12:17:51 UTC
SVN commit 1016257 by pino:

temporarly force 72x72 DPI
CCBUG: 204864


 M  +1 -1      generator_pdf.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1016257
Comment 8 Pino Toscano 2010-01-29 16:09:34 UTC
*** Bug 204864 has been marked as a duplicate of this bug. ***
Comment 9 Pino Toscano 2010-01-29 16:12:22 UTC
SVN commit 1082032 by pino:

force 72x72 DPI as well in trunk

had no time to investigate the issue with some multiscreen configurations, so
until more investigation is done, use that values
BUG: 204864


 M  +1 -1      generator_pdf.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1082032