Skip to content

glib: automatic handle of page's cropbox on annots

Core poppler annot (Annot.cc) has cropbox offsets included in the coordinates of the relevant fields (rect and quadrilaterals fields).

This commit makes poppler-glib API not include cropbox offsets when providing annot info to clients (by substracting cropbox offsets from the read core Annot info) and in the same way, assumes no cropbox offsets are included in the info received from clients to create new annots (cropbox offsets will be automatically added to the corresponding core poppler Annot).

As a result of this, existent clients (like Evince) now automatically work right for annotations placed in pages that have a cropbox.

Poppler issue: #129 (closed) Evince issue: https://gitlab.gnome.org/GNOME/evince/issues/1280

Merge request reports