Destinations Reference¶
- class pdfnaut.objects.destinations.Destination[source]¶
Bases:
PdfArrayA explicit destination points to a page within a PDF document with a specified location and zoom factor.
See ISO 32000-2:2020 § 12.3.2 “Destinations” for details.
- property args: Sequence[PdfObject]¶
The arguments provided to the destination, such as coordinates or the zoom factor.
- classmethod fit(page: Page) Self[source]¶
Creates a destination to
pagewith its contents magnified enough to fit the entire page within the window.
- classmethod fit_bbox(page: Page) Self[source]¶
Creates a destination to
pagewith its contents magnified enough to fit the page bounding box.
- classmethod fit_bbox_horizontal(page: Page, top: int | float | None = None) Self[source]¶
Creates a destination to
pagewith its contents magnified enough to fit the entire bounding box of the page within the window horizontally and the top edge of the window positioned at the vertical coordinatetop.
- classmethod fit_bbox_vertical(page: Page, left: int | float | None = None) Self[source]¶
Creates a destination to
pagewith its contents magnified enough to fit the entire bounding box of the page within the window vertically and the left edge of the window positioned at the horizontal coordinateleft.
- classmethod fit_horizontal(page: Page, top: int | float | None = None) Self[source]¶
Creates a destination to
pagewith its contents magnified enough to fit the entire page within the window horizontally and the top edge of the window positioned at the vertical coordinatetop.
- classmethod fit_rectangle(page: Page, left: int | float, bottom: int | float, right: int | float, top: int | float) Self[source]¶
Creates a destination to
pagewith its contents magnified enough to fit the rectangle formed by the coordinatesleft,bottom,right, andtop.
- classmethod fit_vertical(page: Page, left: int | float | None = None) Self[source]¶
Creates a destination to
pagewith its contents magnified enough to fit the entire page within the window vertically and the left edge of the window positioned at the horizontal coordinateleft.
- property kind: Literal['XYZ', 'Fit', 'FitH', 'FitV', 'FitR', 'FitB', 'FitBH', 'FitBV']¶
The kind of destination.
- classmethod xyz(page: Page, left: int | float | None = None, top: int | float | None = None, zoom: int | float | None = None) Self[source]¶
Creates a coordinate destination to
pagewith the coordinates (left,top) positioned at the upper-left corner of the window and the contents of the page magnified by the specifiedzoomfactor.Omitting these parameters means that the current value shall remain unchanged.