Skip to content
documentation.help
Manuals A–ZSearch
Documentation/PyMuPDF/Link

Link

From PyMuPDF

previous page next page

Navigation

  • index
  • next |
  • previous |
  • PyMuPDF 1.12.2 documentation »
  • Classes »

Link

Represents a pointer to somewhere (this document, other documents, the internet). Links exist per document page, and they are forward-chained to each other, starting from an initial link which is accessible by the Page.firstLink property.

There is a parent-child relationship between a link and its page. If the page object becomes unusable (closed document, any document structure change, etc.), then so does every of its existing link objects - an exception is raised saying that the object is “orphaned”, whenever a link property or method is accessed.

Attribute Short Description
Link.rect clickable area in untransformed coordinates.
Link.uri link destination
Link.isExternal external link destination?
Link.next points to next link
Link.dest points to link destination details

Class API

class Link
rect

The area that can be clicked in untransformed coordinates.

Type:Rect
isExternal

A bool specifying whether the link target is outside of the current document.

Type:bool
uri

A string specifying the link target. The meaning of this property should be evaluated in conjunction with property isExternal. The value may be None, in which case isExternal == False. If uri starts with file://, mailto:, or an internet resource name, isExternal is True. In all other cases isExternal == False and uri points to an internal location. In case of PDF documents, this should either be #nnnn to indicate a 1-based (!) page number nnnn, or a named location. The format varies for other document types, e.g. uri = '../FixedDoc.fdoc#PG_2_LNK_1' for page number 2 (1-based) in an XPS document.

Type:str
next

The next Link or None

Type:Link
dest

The link destination details object.

Type:linkDest

Navigation

  • index
  • next |
  • previous |
  • PyMuPDF 1.12.2 documentation »
  • Classes »
© Copyright 2015-2018, Jorj X. McKie. Last updated on 13. Jan 2018. Created using Sphinx 1.6.6.
previous page start next page

Static archive of product and software documentation. Trademarks belong to their respective owners.