Skip to content

PageViewport

Unofficial

Represents a viewport for a PDF page.

Import:

import type { PageViewport } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface PageViewport

Properties

PropertyTypeDescription
heightnumberHeight of the viewport.
offsetXnumberHorizontal offset.
offsetYnumberVertical offset.
rotationnumberRotation angle in degrees.
scalenumberScale factor.
transformnumber[]Transformation matrix.
viewBoxnumber[]The view box coordinates.
widthnumberWidth of the viewport.

Methods

MethodReturnsDescription
clone(params?)PageViewportClones the viewport with optional parameter overrides.
convertToPdfPoint(x, y)[number, number]Converts viewport coordinates to PDF coordinates.
convertToViewportPoint(x, y)[number, number]Converts PDF coordinates to viewport coordinates.

Links to this page: