Atrium — shared contracts and the typesetting engine
    Preparing search index...

    Interface RenderPdfOptions

    PDF emission: positioned pages in, bytes out.

    This is the bottom of the engine. It does no layout, no measurement and no I/O — it receives Pages whose every coordinate is already decided and turns them into a PDF 1.7 file with each face embedded as a subset.

    It never throws. compile() has a catch-all above it, but relying on that would report an emission failure as an anonymous engine bug; failures are turned into diagnostics here, where there is enough context to name what went wrong. pdf is null whenever an error-severity diagnostic was produced.

    It is deterministic. The same Page[] produces byte-identical output on every run and every machine. That is a requirement, not a nicety — it is what lets a test assert on bytes at all. Three things had to be pinned for it: no creation date (see creationDate), a /ID hashed from content rather than from a clock (serialize.ts), and subset tags derived from a font's position in the document rather than from pdf-lib's random suffix (subset.ts).

    interface RenderPdfOptions {
        compressStreams?: boolean;
        creationDate?: string;
        file?: string;
        maxOutputBytes?: number;
        producer?: string;
        title?: string;
    }
    Index
    compressStreams?: boolean

    Flate-compress content and CMap streams. On by default; tests turn it off to read the operators back out of the file.

    creationDate?: string

    /CreationDate, as a PDF date string (D:YYYYMMDDHHmmSSZ). Omitted by default, and that is deliberate: a clock read here would make the output unreproducible, so a caller that wants a date must supply one it chose.

    file?: string

    Project-relative path diagnostics are attributed to — the entrypoint, as far as a reader is concerned. Emission failures have no single source line, so they are reported against the file as a whole.

    maxOutputBytes?: number

    Reject rather than allocate above this size. Unset means no cap.

    producer?: string

    /Producer.

    title?: string

    /Title. Omitted when unset.