pdfextract API
    Preparing search index...

    Interface OpenPdfOptions

    Engine assets, password, resource budgets and an optional caller-owned OCR provider for a whole PDF.

    interface OpenPdfOptions {
        assets?: {
            baseUrl?: string | URL;
            wasmUrl?: string | URL;
            workerUrl?: string | URL;
        };
        limits?: PdfLimits;
        ocr?: OcrProvider;
        onProgress?: (event: ProgressEvent) => void;
        password?: string;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index
    assets?: {
        baseUrl?: string | URL;
        wasmUrl?: string | URL;
        workerUrl?: string | URL;
    }

    Self-hosted engine locations. Node defaults resolve included package assets; browser bundlers should set baseUrl.

    Type Declaration

    • OptionalbaseUrl?: string | URL

      Base URL of the copied core asset directory, including sibling codecs, fonts and notices.

    • OptionalwasmUrl?: string | URL

      A WASM file URL whose directory contains the qcms/OpenJPEG runtime assets.

    • OptionalworkerUrl?: string | URL

      Override for the patched pdf.worker.mjs module; retain its sibling PNG encoder.

    limits?: PdfLimits

    Resource budget overrides; full image export fails clearly instead of silently downscaling.

    Borrowed provider. Closing the PDF never closes this provider.

    onProgress?: (event: ProgressEvent) => void

    Called during work. Keep callbacks lightweight and avoid throwing.

    password?: string

    Password supplied to the PDF security handler; no interactive password prompt is opened.

    signal?: AbortSignal

    Aborts queued work promptly; a synchronous engine decode already running may finish before cleanup.