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

Property Type Description
height number Height of the viewport.
offsetX number Horizontal offset.
offsetY number Vertical offset.
rotation number Rotation angle in degrees.
scale number Scale factor.
transform number[] Transformation matrix.
viewBox number[] The view box coordinates.
width number Width of the viewport.

Methods

Method Returns Description
clone(params?) PageViewport Clones 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: