Bug 339347 - Rendering of files is in landscape and the page is stretched
Summary: Rendering of files is in landscape and the page is stretched
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.19.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-24 05:14 UTC by Thomas
Modified: 2014-09-26 05:14 UTC (History)
1 user (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 Thomas 2014-09-24 05:14:02 UTC
When opening a pdf file the file is displayed in a stretched way (i.e. it should be portrait, but is displayed in landscape. This happens with all pdf files I open.
The problem started recently, when I installed a second monitor to my setup. 



Reproducible: Always

Steps to Reproduce:
1. Open any pdf document 

Actual Results:  
stretched pdf (looks like the portrait pdf is displayed in landscape and landscape pdfs are stretched to doubled width).



The setup in general is as follows:
A Dell E5440 conected to a docking station with 2 Monitor outs. 
The Monitors are connected to the display ports. Interestingly the system does not detect 2 monitors but only one screen with double the size of the old one.
xdpyinfo correctly tells the setups physical size and width, even though it does not show this as two monitors but only as one:
screen #0:
  dimensions:    3840x1080 pixels (1016x286 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0xbe
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x42
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store WHEN MAPPED, save-unders NO
  largest cursor:    64x64

However kscreen and xrandr yield wrong physical sizes:
xrandr:
DP1 connected primary 3840x1080+0+0 (normal left inverted right x axis y axis) 527mm x 297mm

kscreen:
Id:  100 
Name:  "DP1" 
Type:  "Unknown" 
Connected:  true 
Enabled:  true 
Primary:  true 
Rotation:  1 
Pos:  QPoint(0,0) 
MMSize:  QSize(527, 297) 
Size:  QSize(3840, 1080) 
Clones:  1 
Mode:  "219" 
Preferred Mode:  "106" 
Preferred modes:  ("106") 
---------

I have tried to set the physical size by xrandr --fbmm but this either get immediatly overwritten or is not set at all. (even though I'm happy to accept, that I was just using it in a wrong way if someone shows me a command that works :) )

The default document viewer of ubuntu works fine and does display pdfs properly and I haven't encountered any other tool yet that displays in this stretched way.
Comment 1 Albert Astals Cid 2014-09-24 21:30:23 UTC
Please enable okular debug output in kdebugdialog, then start okular from a shell and attach the output about dpi information, for example mine is

okular(17408) Okular::Utils::realDpi: Found widget at output # 66
okular(17408) Okular::Utils::realDpi: Output size is (mm)  QSize(344, 193)
okular(17408) Okular::Utils::realDpi: Output rect is  QRect(0,0 1920x1080)
okular(17408) Okular::Utils::realDpi: EDID WxH (cm):  34 x 19
okular(17408) Okular::DocumentPrivate::openDocumentInternal: Output DPI: QSizeF(141.767, 142.135)
Comment 2 Thomas 2014-09-25 04:55:03 UTC
Hi,

I started okular (and its ticked in kdebugsettings. The whole output I get is:

QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Got bus address:  "unix:abstract=/tmp/dbus-l2wkGEI9qV,guid=1c7e5e1d6151123bfd93b01f542019d4" 
Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-l2wkGEI9qV,guid=1c7e5e1d6151123bfd93b01f542019d4" 
Registered DEC:  true 
thomas@LPP00260:~/Work/Models/Human$ okular
Got bus address:  "unix:abstract=/tmp/dbus-l2wkGEI9qV,guid=1c7e5e1d6151123bfd93b01f542019d4" 
Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-l2wkGEI9qV,guid=1c7e5e1d6151123bfd93b01f542019d4" 
Registered DEC:  true 
okular(17418)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(17418)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(17418)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(17418)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(17418)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
Registered event listener change listener:  true 
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
FIXME: handle dialog start. 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
FIXME: handle dialog end. 
This backend is only for XRandR 1.1, your version is:  1 . 4 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!" 
QSpiAccessible::accessibleEvent not handled:  "8008"  obj:  QObject(0x0)  " invalid interface!"

i.e. there are no details about graphics apart from the fact that its complaining about a too recent xrandr.
Comment 3 Albert Astals Cid 2014-09-25 22:15:56 UTC
Errr, you said in another thread you had updated to KDE 4.14, and i see you have not. Please update to KDE 4.14 and then give us the information.
Comment 4 Thomas 2014-09-26 05:14:45 UTC
Ok.... I see my mistake....
I did not upgrade okular itself (stupid me) just the KDE-core stuff. Sorry and thanks for the invested time.