I’m trying to work with annotations in a pdf, where I’ve used evince to load it inside PyGtk:
from gi.repository import Gtk
from gi.repository import EvinceDocument
doc = EvinceDocument.Document.factory_get_document(‘file://’+filename)
page = doc.get_page(0)
annotations = doc.get_annotations(page)
annotate = annotations.nth(0)
So annotate has the first annotation on the first page. It has a type EvinceDocument.Mapping, but i’m not sure what to do next? annotate only has the area and data methods, where area gives me an EvinceDocument.Rectangle (x,y co-ordinates) and data looks like a pointer address (94829082300048)? So should i being trying to find something that can turn a Mapping into an Annotation? Or is there some other easier way to get the annotation?