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

textColor and setTextColor members of TextAnnotation subclass not accessible #47

Open
dquigley533 opened this issue Jun 10, 2021 · 1 comment

Comments

@dquigley533
Copy link

I'm finding this project to be highly valuable. Thanks for making it available.

One thing I've run into is that I can only change the background color of pdf text annotations, not the color of the text itself. The former seems to be possible within poppler-qt5, but isn't wrapped here?

https://people.freedesktop.org/~aacid/docs/qt5/classPoppler_1_1TextAnnotation.html

SetTextFont is wrapped, but the QFont class passed into that doesn't include the text color. If textColor and setTextColor could be accessible via this Python interface then that would be great.

@dquigley533
Copy link
Author

Just an update on this.

I had a crack at wrapping these myself which was pretty straightforward. I can submit a PR if that's useful.

Changing the colour of text via setTextColor and writing the document to file results in a new pdf which can be parsed. Reading the textColor of the annotations within returns the new colour, but no pdf reader I've tried actually renders them in that colour.

After digging a little into how various readers encode the font colour of text annotations it seems there's no real standard, so perhaps this isn't worth pursuing.

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

1 participant