Skip to content

Is there any way to get the color and direction of rotation of an annotation? #3333

Closed Answered by JorjMcKie
izerui asked this question in Q&A
Discussion options

You must be logged in to vote

No - here is a misconception:
PDF only supports 2 different colors in all of its object definitions (i.e. including annotations): Stroke color and fill color. So, by design of PDF, there is no way to specify (or inquire) all 3 desired colors: border, fill and text color.

The text color specifically must be inquired by extracting the text in the normal way.

You could of course extract the /RC, /DS contents (XML/HTML formatted strings). Then use some package to parse them. This is beyond PyMuPDF`s scope.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@JorjMcKie
Comment options

@izerui
Comment options

@izerui
Comment options

@JorjMcKie
Comment options

Answer selected by izerui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
not a bug not a bug / user error / unable to reproduce
3 participants
Converted from issue

This discussion was converted from issue #3330 on April 02, 2024 10:02.