Skip to content

Create link to another page/place in pdf #2065

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

You must be logged in to vote

Here is some help for your example:

  1. Locate the area you wish to cover with the link. FYI: this does not need to be text at all, could be an area covering an image or even empty space. If you want text, you must locate its bbox.
  2. Define a dictionary {"kind": fitz.LINK_GOTO, "page": 9, "from": area, "to": point}. Where "point" is a fitz.Point on the target page.
  3. Execute page.insert_link(... this dictionary ...).

We will include this "recipe" in the documentation.

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@chrisjd20
Comment options

@JorjMcKie
Comment options

@chrisjd20
Comment options

@JorjMcKie
Comment options

@chrisjd20
Comment options

Answer selected by JorjMcKie
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #2064 on November 19, 2022 18:58.