[Poppler-bugs] [Bug 96764] Annotations appear at the wrong place

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 12 19:08:59 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=96764

--- Comment #6 from Jose Aliste <jose.aliste at gmail.com> ---
This is what German found out.

After uncompressing the PDF you posted in Poppler:

$ pdftk bug.pdf output bug-u.pdf uncompress

You can find that /MediaBox is different than /TrimBox and /Cropbox.

<<
/pdftk_PageNum 1
/Rotate 0
/TrimBox [38 40 422 659]
/Resources 4 0 R
/Contents 24 0 R
/Parent 41 0 R
/Type /Page
/Thumb 1 0 R
/MediaBox [0 0 468 681]
/CropBox [0 40 422 659]
>>

Just to test, I set all of them to [0 0 468 681] and poppler-glib-demo shows
the highlight text where it is expected.

poppler-qt5 frontend (the one used by Okular) has a method to normalize the
user coordinates with respect to the document. I believe that is what makes the
difference.

See
https://cgit.freedesktop.org/poppler/poppler/tree/qt5/src/poppler-annotation.cc#n202

poppler-glib does not have such normalization. I wonder why it should be
normalized in the front-end and not in the core of poppler (or have an API for
that).

Nevertheless, the way to solve it is having a helper either in poppler, to be
consumed by the frontends or add a function in poppler-glib to normalized the
coordinates.

Definitively not a bug in Evince. I am closing this bug, as once it is fixed in
Poppler, Evince will behave properly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20160712/a5ca3a0e/attachment.html>


More information about the Poppler-bugs mailing list