[okular] [Bug 387639] Annotations are only partially selectable on a hidpi screen

Tobias Deiminger bugzilla_noreply at kde.org
Wed Jan 3 16:23:46 UTC 2018


https://bugs.kde.org/show_bug.cgi?id=387639

--- Comment #9 from Tobias Deiminger <haxtibal at posteo.de> ---
Here's an analysis of what happens for your document:

Your PDF has page size 56.693 x 56.693 pts (from pdfinfo).
LaTex created your annotation object with a /Rect [ 23.448 39.927 35.403 51.882
] (inspected with qpdf --qdf --object-streams=disable).
I.e., LaTex set the icon size to 11,955 x 11,955 pts (width=35.403-23.448,
heigth = 51.882-39.927).
There's no embedded appearance. That's ok, default icon shall be used.
When loading the file to Okular, Poppler reports annotation boundary metadata:
l = 0,413596, t = 0,084861, r = 0,624469, b = 0,295733.
Now we can denormalize those values for verification, using page width * (r-l)
and page height * (b-t): That's 11,955 x 11,955 pts again.
=> The same as in /Rect, all fine until now!
Now comes Poppler and forces the icon to size 24 x 24 pts during rendering, see
[1]. It doesn't update metadata accordingly.
Okular can't know about that 24 x 24 pts. It looks at values derived from l, t,
r, b and draws the rectangle for a icon of size 11,96 x 11,96 pts.
=> mismatch!

This is not even related to HiDPI. I get the same misfit in normal DPI mode. I
think Poppler should really not ignore the values in /Rect. We need to decide
if we want to go for an workaround in Okular (overwrite metadata with hardcoded
known values), or if we try to solve it in poppler. I'd suggest to discuss this
in https://phabricator.kde.org/D9615.

[1]
https://cgit.freedesktop.org/poppler/poppler/tree/poppler/Annot.cc?h=poppler-0.62.0#n2469

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list