import { PdfObject } from '../core/objects/pdf-object.js'; import { ByteArray } from '../types.js'; import { PdfDocument } from './pdf-document.js'; /** * A reader for parsing PDF data into PdfDocument instances. * Processes streams of PDF objects and constructs documents from them. * * @example * ```typescript * // Read PDF from file bytes * const document = await PdfReader.fromBytes(fileBytes) * ``` */ export declare class PdfReader { /** The stream of PDF objects to read from */ protected objectStream: AsyncIterable | Iterable; /** * Creates a new PdfReader instance. * * @param objectStream - An async or sync iterable of PDF objects */ constructor(objectStream: AsyncIterable | Iterable); /** * Reads all objects from the stream and constructs a PdfDocument. * * @returns A promise that resolves to the parsed PdfDocument */ read(): Promise; /** * Creates a PdfDocument directly from a byte stream. * Convenience method that creates a reader internally. * * @param input - Async or sync iterable of byte arrays * @returns A promise that resolves to the parsed PdfDocument */ static fromBytes(input: AsyncIterable | Iterable, options?: { password?: string; ownerPassword?: string; incremental?: boolean; }): Promise; }