Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create annotations #14

Open
cycomanic opened this issue Jan 20, 2016 · 1 comment
Open

How to create annotations #14

cycomanic opened this issue Jan 20, 2016 · 1 comment
Assignees

Comments

@cycomanic
Copy link

Hi,

I'm trying to add an highlightannotation to a document, but I am completely stuck. It is unclear to me how to even create a highlightannotation. If I do

ann = popplerqt4.Poppler.HighlightAnnotation()

I get a type error.

TypeError: popplerqt4.HighlightAnnotation cannot be instantiated or sub-classed

I also can not find the addAnnotation method for a page.

popplerqt4.version()
Out[57]: (0, 24, 0)
In [58]: popplerqt4.poppler_version()
Out[58]: (0, 33, 0)
@wbsoft wbsoft self-assigned this Jan 21, 2016
@wbsoft
Copy link
Collaborator

wbsoft commented Jan 21, 2016

I am not sure whether the api binding is complete yet, but will look into it. An annotation seems to be instantiated using AnnotationUtils.createAnnotation, which requires a QDomElement. Be sure QtXML support is compiled in.... This thread explains some more: http://lists.freedesktop.org/archives/poppler/2012-May/009220.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants