import type { Readable } from "node:stream"; import type { PdfEmbeddedFontInput, PdfFontInput } from "./font-embedding.js"; import type { PdfDocumentPhase3 } from "./phase3-types.js"; import type { PdfGraphic } from "./phase4-types.js"; import type { PdfDocumentPhase6 } from "./phase6-types.js"; import type { PdfDocumentPhase7 } from "./phase7-types.js"; import type { PdfDocumentPhase8 } from "./phase8-types.js"; import type { PdfRenderOptions } from "./phase9-types.js"; import { preprocessPdfDocumentInput } from "./relaxed-input.js"; import { type PdfValidationResult } from "./validate-document.js"; import type { PdfFillExistingFormOptions, PdfFillExistingFormResult, PdfFormInspection, PdfFormValue } from "./pdf-form-fill.js"; import type { PdfQualityReport, PdfRepairOptions, PdfRepairResult, PdfRepairValidationResult, PdfSignOptions, PdfValidationSummary } from "./phase10-types.js"; import type { RenderWithQualityResult } from "./public-quality-types.js"; export interface PdfMetaPhase1 { author?: string; creationDate?: Date | string; creator?: string; keywords?: string[]; modDate?: Date | string; producer?: string; subject?: string; title?: string; } export interface PdfTextPhase1 { direction?: "auto" | "ltr" | "rtl"; font?: PdfFontInput; fallbackFonts?: PdfEmbeddedFontInput[]; fontSize?: number; value: string; x?: number; y?: number; } export interface PdfPagePhase2 { graphics?: PdfGraphic[]; height?: number; text?: PdfTextPhase1; texts?: PdfTextPhase1[]; width?: number; } export interface PdfDocumentPhase2 { meta?: PdfMetaPhase1; pages: PdfPagePhase2[]; } export type PdfTextPhase2 = PdfTextPhase1; export type PdfPagePhase1 = PdfPagePhase2; export type PdfDocumentPhase1 = PdfDocumentPhase2; export type PdfDocumentPhase5 = PdfDocumentPhase3; export type { PdfDocumentPhase6 }; export type { PdfDocumentPhase7 }; export type { PdfDocumentPhase8 }; export type { PdfRenderOptions }; export type PdfDocument = PdfDocumentPhase2 | PdfDocumentPhase8; export declare class PdfEngine { private static renderBuffer; static render(document: PdfDocument, options?: PdfRenderOptions): Promise; static inspectForm(input: Buffer | Uint8Array): Promise; static fillForm(input: Buffer | Uint8Array, values: Record, options?: PdfFillExistingFormOptions): Promise; static renderWithQuality(document: PdfDocument, options?: PdfRenderOptions): Promise; static sign(document: PdfDocument, options: PdfSignOptions): Promise; /** * Validate a `PdfDocument` (synchronous) — returns `{ ok, issues }` * without throwing. Mirror of `validateDocxDocument` and * `lintSpreadsheetDocument` so a tool can call `validate(doc)` against * any engine and get a uniform issue list. * * Buffer overload — async, returns the deeper post-emit summary. */ static validate(document: unknown): PdfValidationResult; static validate(buffer: Buffer): Promise; static quality(buffer: Buffer): Promise; static repair(buffer: Buffer, options?: PdfRepairOptions): Promise; static validateAndRepair(buffer: Buffer, options?: PdfRepairOptions): Promise; static renderStream(document: PdfDocument, options?: PdfRenderOptions): Readable; } export declare function validatePdfDocument(document: unknown, options?: Parameters[1]): PdfDocument; //# sourceMappingURL=engine.d.ts.map