MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / insert_link

Method insert_link

src/__init__.py:12555–12561  ·  view source on GitHub ↗

Insert a new link for the current page.

(page: 'Page', lnk: dict, mark: bool = True)

Source from the content-addressed store, hash-verified

12553 return xref
12554
12555 def insert_link(page: 'Page', lnk: dict, mark: bool = True) -> None:
12556 """Insert a new link for the current page."""
12557 CheckParent(page)
12558 annot = utils.getLinkText(page, lnk)
12559 if annot == "":
12560 raise ValueError("link kind not supported")
12561 page._addAnnot_FromString((annot,))
12562
12563 def insert_text(
12564 page: 'Page',

Callers 10

remove_rotationMethod · 0.95
insert_htmlboxMethod · 0.80
add_pdf_linksMethod · 0.80
test_2886Function · 0.80
test_2922Function · 0.80
test_3301Function · 0.80
test_deletionFunction · 0.80
test_3347Function · 0.80
test_3400Function · 0.80
code-printer.pyFile · 0.80

Calls 2

CheckParentFunction · 0.85
_addAnnot_FromStringMethod · 0.80

Tested by 6

test_2886Function · 0.64
test_2922Function · 0.64
test_3301Function · 0.64
test_deletionFunction · 0.64
test_3347Function · 0.64
test_3400Function · 0.64