import type { PdfEncryptionResult } from "./encryption/types.js"; import { PDFIndirectObject, PDFRef, type PDFValue } from "./pdf-objects.js"; export interface PDFWriteOptions { encrypt?: PdfEncryptionResult; fileId?: [Buffer, Buffer]; info: PDFRef; objects: PDFIndirectObject[]; root: PDFRef; version?: string; /** * Emit a `/Type /XRef` cross-reference stream instead of the classic * `xref ... trailer` block. The renderer sets this true only when the * caller has explicitly opted into a 1.5+ target via * `options.pdfVersion`; feature-implied version bumps (PDF/A-2b โ†’ 1.7, * AES-256 โ†’ 1.7) do NOT switch the xref format on their own, because * downstream tooling (validator, repair, signature byte-range * computation) depends on the classic xref layout for those code paths. */ useXrefStream?: boolean; /** * Pack non-stream generation-0 dictionary objects into `/Type /ObjStm` * compressed object streams. Requires `useXrefStream: true` (object * streams cannot be referenced by classic xref). Mutually exclusive * with `encrypt` for now โ€” per ISO 32000-1 ยง7.5.7, object streams * follow per-stream encryption rather than per-object, but the * encryption interop is intentionally deferred to a follow-up. */ packObjectStreams?: boolean; } export declare function writePdfDocument(options: PDFWriteOptions): Buffer; export type { PDFIndirectObject, PDFValue };