-
Notifications
You must be signed in to change notification settings - Fork 13
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
setStyle method on HighlightAnnotation #10
Comments
The Style changed from a struct to a class, I have been trying to write the correct sip specification in |
Thank you for the quick reply! I finally managed to change the color. Unfortunately, I've never used sip so I cannot really help to fix I've taken the code of the Style class of python-poppler-qt5 and inserted it in Given
I was then able to read all attributes with
However changing the value of the attributes with
But setting a new style with an other color worked !
According to the poppler-qt4 documentation one should be able to change the color with Note that for other reasons I updated to:
|
Is in C++ the equivalent of |
I seems I forgot that I already took some efforts in poppler-qt5 and to merge those in poppler-qt4 as well. I'm very busy right now, but hopefully in the coming weeks I can release a python-poppler-qt4 which is on par with python-poppler-qt5... |
I haven't tested it in c++ but it seems that it is how they do it in Okular http://code.openhub.net/file?fid=LbKk_wSlBp_sOb7CuEHiDuEx4QU&cid=rh68-VIVNW8&s=setColor&fp=303105&projSelected=true&filterChecked=true&mp=1&ml=1&me=1&md=1#L65 |
Thanks for investigating! |
Hi all
I cannot figure out how to change the color of an existing HighlightAnnotation. I have a PDF document with existing HighlightAnnotations that I can retrieve for a given page with:
which gives me two annotations of type Highlight.
Now I can change the author or change the quads with respectively the
setAuthor()
andsetHighlightQuads()
methods. This works perfectly and it has the expected behavior when the document is saved (withpdfConverter()
).My question is, given
annotations
, what is the proper way to change the color of the highlight ? I've seen in a couple of c++ examples that they useannot->style().setColor( RED );
for instance. How can I access the style property of my annotations with python ? In my example I have only access to the attributes below. Thank you in advance for any hints !The text was updated successfully, but these errors were encountered: