Skip to content

How do I add a clickable area with an external link? #1373

Discussion options

You must be logged in to vote

I understand handling links is a new feature and if it's not possible to do what I want, please let me know :)

On the contrary: it is quite an old feature 😉and you sure can do it.

Some background:
Links and annotations used to be supported for all document types in MuPDF. Annotation support has then been restricted to PDFs at some point.
In PyMuPDF, annotations have been added much later than links. This is why they are handled via a differently looking API.

There is page.insert_link(link) to insert a new link on a page. The argument must a dictionary as described here, look at section heading "Description of get_links() Entries".

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by steinerlein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants