import { ContentStream } from './content-stream.ts'; /** * A link annotation on a page. * - `url`: Links to an external URL. * - `destination`: Links to a named destination within the document. */ export type PDFLink = { type: 'url'; x: number; y: number; width: number; height: number; url: string; } | { type: 'destination'; x: number; y: number; width: number; height: number; destination: string; }; /** * A named destination on a page. */ export type PDFDestination = { name: string; x: number; y: number; }; /** * Page rotation in degrees, clockwise. */ export type PageRotation = 0 | 90 | 180 | 270; /** * Represents a single page within a PDF document. */ export declare class PDFPage { private readonly _links; private readonly _destinations; /** * The content stream of this page. */ readonly contentStream: ContentStream; /** The width of the page in user space units. */ readonly width: number; /** The height of the page in user space units. */ readonly height: number; /** The rotation of the page in degrees, clockwise. Must be a multiple of 90. */ rotation: PageRotation; /** * Creates a new PDFPage instance. */ constructor(width: number, height: number); /** * Returns an iterator over all link annotations on this page. */ links(): IterableIterator; /** * Returns an iterator over all named destinations on this page. */ destinations(): IterableIterator; /** * Adds a link annotation to this page. */ addLink(link: PDFLink): void; /** * Adds a named destination to this page. */ addDestination(destination: PDFDestination): void; }