The Destination Class

class PyPDF2.generic.Destination(title, page, typ, *args)

A class representing a destination within a PDF file. See section 8.2.1 of the PDF 1.6 reference.

Parameters:
  • title (str) – Title of this destination.
  • page (int) – Page number of this destination.
  • typ (str) – How the destination is displayed.
  • args – Additional arguments may be necessary depending on the type.
Raises PdfReadError:
 

If destination type is invalid.

Valid typ arguments (see PDF spec for details):
/Fit No additional arguments
/XYZ [left] [top] [zoomFactor]
/FitH [top]
/FitV [left]
/FitR [left] [bottom] [right] [top]
/FitB No additional arguments
/FitBH [top]
/FitBV [left]
bottom

Read-only property accessing the bottom vertical coordinate.

Return type:int, or None if not available.
left

Read-only property accessing the left horizontal coordinate.

Return type:int, or None if not available.
page

Read-only property accessing the destination page number.

Return type:int
right

Read-only property accessing the right horizontal coordinate.

Return type:int, or None if not available.
title

Read-only property accessing the destination title.

Return type:str
top

Read-only property accessing the top vertical coordinate.

Return type:int, or None if not available.
typ

Read-only property accessing the destination type.

Return type:str
zoom

Read-only property accessing the zoom factor.

Return type:int, or None if not available.