pdftools_toolbox.pdf.navigation.link
Classes
|
A link |
- class pdftools_toolbox.pdf.navigation.link.Link(handle)[source]
Bases:
_NativeObject
,ABC
A link
- static copy(target_document: Document, link: Link) → Link[source]
Copy a link from an input document to a output document.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – the output document with which the returned object is associated
link (pdftools_toolbox.pdf.navigation.link.Link) – the link to be copied to the targetDocument
- Returns:
the copied link, associated with the targetDocument
- Return type:
- Raises:
ValueError – if the targetDocument has already been closed
ValueError – if the targetDocument is read-only
ValueError – if the link is not associated with an input document
ValueError – if the document associated with the link object has already been closed
pdftools_toolbox.conformance_error.ConformanceError – The conformance level of the input document is not compatible with the conformance level of the targetDocument.
OSError – Error reading from the input document or writing to the output document
- property active_area: QuadrilateralList
The link area
The link is activated when a mouse click falls within the area defined by this list of
pdftools_toolbox.geometry.real.quadrilateral.Quadrilateral
s.- Returns:
pdftools_toolbox.geometry.real.quadrilateral_list.QuadrilateralList
- Raises:
StateError – if the object has already been closed
pdftools_toolbox.corrupt_error.CorruptError – if the PDF is corrupt
- property bounding_box: Rectangle
The location on the page
- Returns:
pdftools_toolbox.geometry.real.rectangle.Rectangle
- Raises:
StateError – if the object has already been closed
pdftools_toolbox.corrupt_error.CorruptError – if the PDF is corrupt
- property hidden: bool
The link’s visibility
If True then the link is present, but is invisible and not available for user interaction. Depending on the
pdftools_toolbox.pdf.navigation.link.Link.no_print
property it will, however, still be visible when printing.- Returns:
bool
- Raises:
StateError – if the object has already been closed
- property no_print: bool
The link’s visibility when printing
If True then the link is not present in a print output of the document.
- Returns:
bool
- Raises:
StateError – if the object has already been closed