/** The PDF `null` object (§7.3.9), modelled as a unique symbol. */ export declare const PDF_NULL: unique symbol; /** The type of the PDF `null` object, {@link PDF_NULL}. */ export type PdfNull = typeof PDF_NULL; /** A PDF name object (§7.3.5), e.g. `/Type` — the leading slash is added on serialization. */ export declare class PdfName { readonly value: string; /** @param value The name's text, without the leading `/`. */ constructor(value: string); } /** An indirect reference (§7.3.10), written `id gen R`. */ export declare class PdfRef { readonly id: number; readonly generation: number; /** * @param id The referenced object number. * @param generation The generation number (0 for freshly written objects). */ constructor(id: number, generation?: number); } /** A PDF stream object (§7.3.8): a dictionary plus its raw byte payload. */ export declare class PdfStream { readonly dict: PdfDict; readonly data: Uint8Array; /** * @param dict The stream dictionary (`/Length` is filled in on serialization). * @param data The raw stream bytes. */ constructor(dict: PdfDict, data: Uint8Array); } /** * A PDF hex string (§7.3.4.3), written as `` and decoding to raw * bytes. Used for `/Info` entries containing non-ASCII text: the bytes are * UTF-16BE with a leading BOM, the PDF-standard form for Unicode strings. */ export declare class PdfHexString { readonly bytes: Uint8Array; /** @param bytes The raw bytes to emit as hex. */ constructor(bytes: Uint8Array); } /** * A verbatim token emitted exactly as given — no escaping, no quoting. Used for * the signature `/ByteRange` placeholder, a fixed-width array overwritten in * place after the byte offsets are known (ISO 32000 §12.8.1). */ export declare class PdfRawToken { readonly token: string; /** @param token The literal text to emit unchanged. */ constructor(token: string); } /** A PDF dictionary (§7.3.7): an ordered map from name keys to {@link PdfValue}s. */ export type PdfDict = Map; /** A PDF array (§7.3.6) of {@link PdfValue}s. */ export type PdfArray = Array; /** Any PDF object value (§7.3): the union of all the primitive and composite object types. */ export type PdfValue = PdfNull | boolean | number | string | PdfName | PdfHexString | PdfRawToken | PdfArray | PdfDict | PdfRef | PdfStream; /** Construct a {@link PdfName} from its text (without the leading `/`). */ export declare const name: (v: string) => PdfName; /** Construct a {@link PdfRef} to object `id` at generation `gen` (default 0). */ export declare const ref: (id: number, gen?: number) => PdfRef; /** Construct a {@link PdfDict} from a plain object of name → value entries. */ export declare const dict: (entries: Record) => PdfDict; /** Construct a {@link PdfStream} from a dictionary literal plus its byte payload. */ export declare const stream: (entries: Record, data: Uint8Array) => PdfStream; /** * A {@link PdfStream} whose payload is deflated (ISO 32000-1 §7.4.4). * * Nothing we wrote was compressed at all — `grep /Filter` over one of our own * files returned the empty set — so a three-page workbook came out at 192 KB * against LibreOffice's 21 KB, most of it an uncompressed font program. Any * stream that is not already in a compressed image format belongs here. * * @param entries The stream's dictionary, minus `/Filter` and `/Length`. * @param data The raw payload. * @returns The stream, deflated, with `/Filter /FlateDecode`. */ export declare const deflatedStream: (entries: Record, data: Uint8Array) => PdfStream; /** * Build a PDF Unicode string (UTF-16BE with BOM) suitable for `/Info` or * document-level text metadata. Accepts arbitrary Unicode input. * * @param s The text to encode. * @returns A {@link PdfHexString} holding the BOM-prefixed UTF-16BE bytes. */ export declare const unicodeString: (s: string) => PdfHexString;