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.internal_link
  • View page source

pdftools_toolbox.pdf.navigation.internal_link

Classes

InternalLink(handle)

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:

pdftools_toolbox.pdf.navigation.internal_link.InternalLink

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:

pdftools_toolbox.pdf.navigation.internal_link.InternalLink

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

Previous Next

© Copyright 2024, PDF Tools AG.

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