pdftools_toolbox.pdf.navigation.internal_link
Classes
|
A document-wide link |
- class pdftools_toolbox.pdf.navigation.internal_link.InternalLink(handle)[source]
Bases:
Link
A document-wide link
- static create(target_document: Document, bounding_box: Rectangle, target: Destination) → InternalLink[source]
Create a document-internal link
The link is associated with the targetDocument but not yet part of any page. It can be added to a page’s list of links.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – The document in which the links is used
boundingBox (pdftools_toolbox.geometry.real.rectangle.Rectangle) – The location on the page.
target (pdftools_toolbox.pdf.navigation.destination.Destination) – The link target
- Returns:
The newly created object
- Return type:
- Raises:
ValueError – if the targetDocument argument has already been closed
ValueError – if the targetDocument argument is read-only
ValueError – if the target argument is not associated with the targetDocument
- static create_from_quadrilaterals(target_document: Document, active_area: QuadrilateralList, target: Destination) → InternalLink[source]
Create a document-internal link with defined link area
The link has an active area defined by the given activeArea. The link is associated with the targetDocument but not yet part of any page. It can be added to a page’s list of links.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – The document in which the links is used
activeArea (pdftools_toolbox.geometry.real.quadrilateral_list.QuadrilateralList) – The active link area on the page.
target (pdftools_toolbox.pdf.navigation.destination.Destination) – The link target
- Returns:
The newly created object
- Return type:
- Raises:
ValueError – if the targetDocument argument has already been closed
ValueError – if the targetDocument argument is read-only
ValueError – if the target argument is not associated with the targetDocument
ValueError – if the activeArea is empty
- property destination: Destination
The link target
- Returns:
pdftools_toolbox.pdf.navigation.destination.Destination
- Raises:
StateError – if the object has already been closed
StateError – if the link has no destination