Bug 444168 - zooming wrong
Summary: zooming wrong
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-21 06:54 UTC by Amnon
Modified: 2021-11-15 12:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08.3


Attachments
screenshot (125.01 KB, image/jpeg)
2021-10-21 06:54 UTC, Amnon
Details
new screenshot (109.03 KB, image/jpeg)
2021-11-11 20:51 UTC, Amnon
Details
screenshot 211115 (209.42 KB, application/pdf)
2021-11-15 12:19 UTC, Amnon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amnon 2021-10-21 06:54:02 UTC
Created attachment 142702 [details]
screenshot

SUMMARY

As of a few days ago the zoom selection on OKULAR on my notebook is somehow broken. To get the normal size on my pdf's -- what used to be 110% until about last week -- now equires 240%.

See attached screenshot. 


STEPS TO REPRODUCE
1. open pdf file
2. try to find good zoom value
3. 240% instead of 110%

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS

Operating System: Kubuntu 21.04
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-38-generic
OS Type: 64-bit
Graphics Platform: X11
Processors: 8 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics


ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2021-10-21 21:48:34 UTC
Seems that your DPI may have broken somehow.

Did you change something regarding hidpi?

Can you do this?

Start kdebugsettings, search for okular, enable full debug for okular (core).
Close kdebugsettings
In the terminal, open Okular and open a pdf file, it will say something like

org.kde.okular.core: Output DPI: QSizeF(143.435, 144.379)


Can you tell us the value you get?

Also can you run 
  xrandr | grep -w connected
on a terminal and tell us the output?
Comment 2 Amnon 2021-10-22 08:47:11 UTC
The problem could be related to the use of a digital projector on Wednesday this week. Connected through HDMI as "unified screen". 

I will try the suggested debugging routine now. (Need to install kdebugsettings first)
Comment 3 Amnon 2021-10-22 08:54:10 UTC
Here is the output of both operations requested:

amyekut@amyekut-XPS-13-9310:~$ okular
org.kde.okular.core: Metadata file is now: "/home/amyekut/.local/share/okular/docdata/461507.2002.04901.pdf.xml"
org.kde.okular.core: "/usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_poppler.so"
org.kde.okular.core: QScreen calculation returned a non square dpi. QSizeF(169.333, 152.4) . Falling back
org.kde.okular.core: Output DPI: QSizeF(72, 72)
org.kde.okular.generators.pdf: [Poppler] "Error: Can't get Fields array<0a>"
org.kde.okular.core: request observer=0x56409d3bd1a0 1224x1584@0
org.kde.okular.core: request observer=0x56409d3bd1a0 1224x1584@1
org.kde.okular.core: sending request observer=0x56409d3bd1a0 1224x1584@0 async == true isTile == false
org.kde.okular.core: request observer=0x56409d3bd1a0 1224x1584@0
org.kde.okular.core: request observer=0x56409d3bd1a0 1224x1584@1
org.kde.okular.core: request observer=0x56409d3bd1a0 1224x1584@1
org.kde.okular.core: request observer=0x56409d3bd1a0 1224x1584@1
org.kde.okular.core: request observer=0x56409d3bd1a0 1224x1584@1
org.kde.okular.core: sending request observer=0x56409d3bd1a0 1224x1584@1 async == true isTile == false
org.kde.okular.core: request observer=0x56409d2c0c20 80x104@0
org.kde.okular.core: sending request observer=0x56409d2c0c20 80x104@0 async == true isTile == false



amyekut@amyekut-XPS-13-9310:~$ xrandr | grep -w connected
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 288mm x 180mm
amyekut@amyekut-XPS-13-9310:~$
Comment 4 Albert Astals Cid 2021-10-22 22:20:32 UTC
Did you update from a super old version by any chance? 

This may be responsible for the fact that you need more zoom to get the same zoom level as before

    QScreen calculation returned a non square dpi. QSizeF(169.333, 152.4) . Falling back
    org.kde.okular.core: Output DPI: QSizeF(72, 72)

But we had this check for a long time.

I guess i can make the check less strict for the next release
Comment 5 Bug Janitor Service 2021-10-22 22:23:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/500
Comment 6 Albert Astals Cid 2021-10-22 23:18:18 UTC
Git commit 2002f4e7e94af8fce1b6e6d95b95cb3905166391 by Albert Astals Cid.
Committed on 22/10/2021 at 22:23.
Pushed by aacid into branch 'release/21.08'.

Relax the check for non square DPI

M  +1    -1    core/utils.cpp

https://invent.kde.org/graphics/okular/commit/2002f4e7e94af8fce1b6e6d95b95cb3905166391
Comment 7 Amnon 2021-10-23 06:22:53 UTC
Will the zooming issue go away if I remove OKULAR and then reinstall?
Comment 8 Amnon 2021-10-23 09:36:49 UTC
I just added a second user on my kubuntu machine. (For an altogether different purpose.)

Running OKULAR from the new user seems to be free of this zooming issue. 

This perhaps means that some settings file associated to the main user got corrupted. Possibly due to the use of an external digital projector a few days ago.
Comment 9 Amnon 2021-11-08 13:37:23 UTC
I am glad that the bug was fixed for future updates. 

But how can I get OKULAR back to normal on my own computer? 

(removing and reinstalling did not solve the problem.)
Comment 10 Nate Graham 2021-11-08 14:08:46 UTC
You can upgrade to the fixed version, which was released a few days ago.

If your distro isn't shipping the fixed version yet, you can (in ascending order of difficulty) use the Flatpak or Snap versions of Okular instead, or build it from source on your own computer, or use a different distro that ships updated software more quickly.
Comment 11 Amnon 2021-11-08 15:16:01 UTC
The "Latest stable release" seems to be 21.08.3 from 2021-11-04.

The official KUBUNTU version offered is  
  okular (4:19.12.3-2ubuntu1) focal 
and that does not look new at all. 

But the snap repository is not there yet either -- they offer 
  latest/stable 	20.12.3 	18 March 2021

Any idea when SNAP will have the new fixed version?
Comment 12 Amnon 2021-11-08 15:34:46 UTC
Correction, I looked on the wrong machine. 

The latest KUBUNTU on the machine where I have troulbe is:
    okular (4:20.12.3-1ubuntu1)
Comment 13 Amnon 2021-11-11 20:51:31 UTC
Created attachment 143467 [details]
new screenshot

showing wrong zoom after installing latest version of okular
Comment 14 Amnon 2021-11-11 20:55:03 UTC
I have just installed the latest: 
 Okular Version 21.08.1

from:
https://ubuntu.pkgs.org/21.04/kubuntu-backports-amd64/okular_21.08.1-1ubuntu3~ubuntu21.04~ppa1_amd64.deb.html

yet the zoom is still wrong...

Please help.
Comment 15 Albert Astals Cid 2021-11-11 21:29:18 UTC
You have *not* installed the latest version as anyone comparing version numbers can see 21.08.1 is smaller than 21.08.3 so *obviously* you don't have a version where the issue is fixed.
Comment 16 Amnon 2021-11-11 21:48:07 UTC
Can you please tell me how to install that very new version?
I have tried searching up and down and came up with nothing. 
(In fact, as I asked a few days ago, telling me which lines to fix in which config file is enough)
Comment 17 Amnon 2021-11-11 21:49:20 UTC
ps. I can't send you an email and you don't seem to read comments on closed tickets. So I have no choice but to repoen it...
Comment 18 Amnon 2021-11-11 21:51:23 UTC
And once more, flatpack and snap do not work for me -- snap offers OKULAR 20.12.3 and ...
Comment 19 Albert Astals Cid 2021-11-11 22:22:07 UTC
We read your emails be it any state the bug is, I'm just particularly ignoring them.

It's not my problem that you're using a distribution that doesn't ship updated versions.

We fixed the bug (or we think we did) in 21.08.3, now if the new version is not available because of the decisions you have taken in regards to which operating system you use, that's a you problem, not a me problem. If you're really in a huge need to get this fixed you can always try to compile Okular yourself or change to a distribution that ships an updated Okular https://okular.kde.org/download/

Stop marking this bug as not fixed (unless you update to something that is actually Okular 21.08.3 or newer and still have the problem)
Comment 20 Amnon 2021-11-12 00:02:16 UTC
@ Albert Astals Cid:

After a lot of looking around I finally got flatpak to install Okular Version 21.08.3 on my machine. 

Snap does not support it -- their latest is version 20.12.3. 

Thanks for your gracious assistance.
Comment 21 Amnon 2021-11-13 12:04:35 UTC
It seems very difficult (for me, on my computer) to have the latest version of OKULAR installed alongside any working version of KILE. 

I have no idea who is to blaim (and as a user it does not really matter to me...).  

Thus I am experimanting with TEXSTUDIO and its built-in pdf viewer.  

It would be very nice (for users, e.g. mathematicains like myself) to have a working, updated, fixed combination of KILE + OKULAR. 

And that OKULAR will also print pdfs in correct maginification on HP laser ptinters. (Now I must use EVINCE for that.) I there was a bug or request filed a few years ago, but can't find it today. But the problem still persists (I just tested it).
Comment 22 Nate Graham 2021-11-13 17:11:30 UTC
Blame your distro for shipping old software. That exact problem is why a lot of people prefer rolling release or semi-rolling distros, which ship software much more rapidly after new versions are released.
Comment 23 Amnon 2021-11-15 12:18:22 UTC
Update (good news):

While sitting at a cafe (just now) I noticed, for the first time since the trouble began, that my computer (DELL XPS 13-9310) screen is not fully used, and that there are blank margins at top and at bottom (about 5 mm each). Evidently the screen resolution was misconfigured.  

Most likely by the connection of the digital projector (as I reported originally on 2021-10-22 11:47:11 IDT ). 

I did not notice this issue when working at home...

Anyhow, I went to the computer display menu and selected 1920x1200 (instead of 1920x1080) resolution. 

This both solved the empty space on the screen, and the OKULAR zoom issue !!! See screenshots.

Lesson (at least for me):  Keep eyes open to possibilties, and don't get impatient.
Comment 24 Amnon 2021-11-15 12:19:23 UTC
Created attachment 143574 [details]
screenshot 211115