Toolbox add-on Logo
  • pdftools_toolbox
    • pdftools_toolbox.conformance_error
    • pdftools_toolbox.corrupt_error
    • pdftools_toolbox.exists_error
    • pdftools_toolbox.generic_error
    • pdftools_toolbox.geometry
    • pdftools_toolbox.http_error
    • pdftools_toolbox.internal
    • pdftools_toolbox.license_error
    • pdftools_toolbox.not_found_error
    • pdftools_toolbox.operation_error
    • pdftools_toolbox.password_error
    • pdftools_toolbox.pdf
      • pdftools_toolbox.pdf.annotations
      • pdftools_toolbox.pdf.conformance
      • pdftools_toolbox.pdf.content
      • pdftools_toolbox.pdf.copy_strategy
      • pdftools_toolbox.pdf.document
      • pdftools_toolbox.pdf.encryption
      • pdftools_toolbox.pdf.file_reference
      • pdftools_toolbox.pdf.file_reference_list
      • pdftools_toolbox.pdf.forms
      • pdftools_toolbox.pdf.metadata
      • pdftools_toolbox.pdf.name_conflict_resolution
      • pdftools_toolbox.pdf.navigation
        • pdftools_toolbox.pdf.navigation.destination
        • pdftools_toolbox.pdf.navigation.direct_destination
        • pdftools_toolbox.pdf.navigation.embedded_pdf_link
        • pdftools_toolbox.pdf.navigation.fit_height_destination
        • pdftools_toolbox.pdf.navigation.fit_page_destination
        • pdftools_toolbox.pdf.navigation.fit_rectangle_destination
        • pdftools_toolbox.pdf.navigation.fit_width_destination
        • pdftools_toolbox.pdf.navigation.internal_link
        • pdftools_toolbox.pdf.navigation.link
        • pdftools_toolbox.pdf.navigation.link_list
        • pdftools_toolbox.pdf.navigation.location_zoom_destination
        • pdftools_toolbox.pdf.navigation.named_destination
        • pdftools_toolbox.pdf.navigation.named_destination_copy_strategy
        • pdftools_toolbox.pdf.navigation.outline_copy_options
        • pdftools_toolbox.pdf.navigation.outline_item
        • pdftools_toolbox.pdf.navigation.outline_item_list
        • pdftools_toolbox.pdf.navigation.page_display
        • pdftools_toolbox.pdf.navigation.page_layout
        • pdftools_toolbox.pdf.navigation.viewer_navigation_pane
        • pdftools_toolbox.pdf.navigation.viewer_settings
        • pdftools_toolbox.pdf.navigation.web_link
      • pdftools_toolbox.pdf.ocg_state
      • pdftools_toolbox.pdf.optional_content_group
      • pdftools_toolbox.pdf.optional_content_group_list
      • pdftools_toolbox.pdf.page
      • pdftools_toolbox.pdf.page_copy_options
      • pdftools_toolbox.pdf.page_list
      • pdftools_toolbox.pdf.permission
      • pdftools_toolbox.pdf.removal_strategy
      • pdftools_toolbox.pdf.structure
    • pdftools_toolbox.sdk
    • pdftools_toolbox.state_error
    • pdftools_toolbox.string_map
    • pdftools_toolbox.sys
    • pdftools_toolbox.unknown_format_error
    • pdftools_toolbox.unsupported_feature_error
Toolbox add-on
  • pdftools_toolbox
  • pdftools_toolbox.pdf
  • pdftools_toolbox.pdf.navigation
  • pdftools_toolbox.pdf.navigation.link
  • View page source

pdftools_toolbox.pdf.navigation.link

Classes

Link(handle)

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:

pdftools_toolbox.pdf.navigation.link.Link

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

property border_style: Stroke | None
Previous Next

© Copyright 2024, PDF Tools AG.

Built with Sphinx using a theme provided by Read the Docs.