pdftools_toolbox.pdf.navigation.named_destination

Classes

NamedDestination(handle)

A named destination that can be referred by name.

class pdftools_toolbox.pdf.navigation.named_destination.NamedDestination(handle)[source]

Bases: Destination

A named destination that can be referred by name. Named destinations have two advantages compared to direct destinations:

static create(target_document: Document, name: str, target: DirectDestination) NamedDestination[source]

Create a named destination

The returned object is not yet used on any page, but it is associated with the given target document.

Parameters:
Returns:

The newly created named destination.

Return type:

pdftools_toolbox.pdf.navigation.named_destination.NamedDestination

Raises:
  • ValueError – if the targetDocument argument has already been closed

  • ValueError – if the targetDocument argument is read-only

  • ValueError – if the document associated with the target argument has already been closed

  • ValueError – if the target argument belongs to a different document

property name: str

The name by which the destination is referred to.

Returns:

str

Raises:
  • StateError – the object has already been closed.

  • StateError – the associated document has already been closed.