-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add URL support for images in PDF backend #23454
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
URL Support for Images in PDF Backend | ||
------------------------------------- | ||
|
||
The PDF backend can now generate clickable images if a URL is provided to the | ||
image. There are a few limitations worth noting though: | ||
|
||
* If parts of the image are clipped, the non-visible parts are still clickable. | ||
* If there are transforms applied to the image, the whole enclosing rectangle | ||
is clickable. However, if you use ``interpolation='none'`` for the image, | ||
only the transformed image area is clickable (depending on viewer support). | ||
Comment on lines
+8
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I'm confused about what this means. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First sentence: Basically, the image with the hand drawn "rectangle" above is clickable. Probably there is a better wording for it. Second sentence: if you rely on the PDF transform (i.e. set interpolation='none' and possibly a few more conditions) the clickable area is the image. Bracket part: not all PDF viewers support that and will fall back on the red rectangle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean, if you zoom in on the image, parts outside the Axes will be clickable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It is sort of easy to fix for non-transformed images (if there is a way to get the Axes extents from the gc(?). But for transformed it is much harder.
(I think the same holds for texts.)