Skip to content

Hyperlinks - Page.insert_link - how to provide a zoomed destination? #1251

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

You must be logged in to vote

gives dictionaries with zoom always 0

Yes, this unfortunately is like so. MuPDF's support for link is limited in that respect. This goes even back to MuPDF v1.10. In this version, all information returned for internal links (GoTo) is the page number and the top-left point on the target - nothing else.

PyMuPDF's API is much richer and stems from pre v1.10 times. Since version v1.10 I am filling in values into the old API as best as is possible.
I will adjust the documentation to make this clear.

page.insert_link with zoom adds a hyperlink with doesn't have any zoom associated

This is a bug. I forgot to accept a provided zoom value. Will be corrected in next version. The only supported …

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@AnweshGangula
Comment options

Comment options

You must be logged in to vote
1 reply
@AnweshGangula
Comment options

Answer selected by AnweshGangula
Comment options

You must be logged in to vote
1 reply
@AnweshGangula
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants