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

Method update_link

src/__init__.py:13137–13144  ·  view source on GitHub ↗

Update a link on the current page.

(page: 'Page', lnk: dict)

Source from the content-addressed store, hash-verified

13135 return Rect(rect[0], mb.y1 - rect[3], rect[2], mb.y1 - rect[1])
13136
13137 def update_link(page: 'Page', lnk: dict) -> None:
13138 """Update a link on the current page."""
13139 CheckParent(page)
13140 annot = utils.getLinkText(page, lnk)
13141 if annot == "":
13142 raise ValueError("link kind not supported")
13143
13144 page.parent.update_object(lnk["xref"], annot, page=page)
13145
13146 def widgets(self, types=None):
13147 """ Generator over the widgets of a page.

Callers 1

test_3070Function · 0.80

Calls 2

CheckParentFunction · 0.85
update_objectMethod · 0.80

Tested by 1

test_3070Function · 0.64