What to do with an EvinceDocument Mapping object?

I’m trying to work with annotations in a pdf, where I’ve used evince to load it inside PyGtk:

import gi
gi.require_version(“Gtk”, “3.0”)
gi.require_version(‘EvinceDocument’, ‘3.0’)
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?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.