Skip to content

ReamConvertOptions

Defined in: src/core/converter/ream.ts:97

Options for Ream.convert and Ream.convertWithReport. Extends the low-level StyledRenderOptions (minus the font registry and styles, which Ream builds itself) with font resolution and source-touching conveniences.

readonly optional attachments?: readonly AttachedFile[]

Defined in: src/layout/styled-layout.ts:331

Files to embed as associated files (catalog /AF + /Names /EmbeddedFiles). Only emitted for plain PDF and PDF/A-3 (PDF/A-1/2 forbid arbitrary embedded files); ignored for PDF/A-1/2. The docx/xlsx converters can embed the source document automatically via embedSource.

StyledRenderOptions.attachments


readonly optional charts?: ReadonlyMap<string, Chart>

Defined in: src/layout/styled-layout.ts:254

Parsed charts keyed by relationship id (ChartBlock.chartRelId). Supplied by the converter, which resolves the chart parts from the package.

StyledRenderOptions.charts


readonly optional commentAnnotations?: boolean

Defined in: src/layout/styled-layout.ts:247

CM2b — also emit each comment as a native PDF /Text (sticky-note) annotation at its marker. Opt-in and interactive-only: suppressed under PDF/A and tagged output (where it would need annotation/appearance conformance), since the clickable marker + Comments section already carry the content there.

StyledRenderOptions.commentAnnotations


readonly optional comments?: ReadonlyMap<string, Comment>

Defined in: src/layout/styled-layout.ts:239

§17.13.4 review comments by id; rendered as superscript markers in text and a list after the body (after endnotes), each with its author/date.

StyledRenderOptions.comments


readonly optional doNotExpandShiftReturn?: boolean

Defined in: src/layout/styled-layout.ts:306

ECMA-376 §17.15.1.35 w:doNotExpandShiftReturn — when set, a justified line that ends at a soft line break (w:br) is drawn at its natural width instead of being stretched out to the measure.

StyledRenderOptions.doNotExpandShiftReturn


readonly optional embeddedFonts?: ReadonlyMap<string, FontRegistry>

Defined in: src/layout/styled-layout.ts:205

The document’s OWN embedded fonts (word/fonts/*.odttf, de-obfuscated), keyed by normalized font name. A run whose w:ascii matches one renders with the real font — glyph-exact, no substitution. Highest priority.

StyledRenderOptions.embeddedFonts


readonly optional embedSource?: boolean

Defined in: src/core/converter/ream.ts:115

PDF/A-3 only: embed the parsed source file (/AFRelationship /Source).


readonly optional encrypt?: PdfEncryptOptions

Defined in: src/layout/styled-layout.ts:324

§7.6 PDF encryption (AES-256, R6). Only honoured on the ASYNC conversion path (WebCrypto); mutually exclusive with pdfA (ISO 19005 forbids /Encrypt) and with signatures (v1).

StyledRenderOptions.encrypt


readonly optional endnotes?: ReadonlyMap<string, readonly BodyElement[]>

Defined in: src/layout/styled-layout.ts:234

StyledRenderOptions.endnotes


readonly optional fileName?: string

Defined in: src/core/converter/ream.ts:131

§18.3.1.34 &F — the workbook’s file name, for a spreadsheet whose header or footer prints it. A byte-oriented reader cannot know it; supplied here, the code resolves, and omitted it is dropped exactly as before.


readonly optional fontBytes?: Uint8Array<ArrayBufferLike>

Defined in: src/core/converter/ream.ts:101

Shorthand for supplying a single regular-variant font as raw bytes.


readonly optional fontFamily?: string

Defined in: src/core/converter/ream.ts:103

Substitute family hint for the auto-download path.


readonly optional fontFetch?: FetchLike

Defined in: src/core/converter/ream.ts:105

Injectable fetch for the auto-download path (defaults to the global fetch).


readonly optional fontProviders?: readonly FontProvider[]

Defined in: src/core/converter/ream.ts:111

Font resolution chain (caller/embedded/local/remote), used when neither fonts nor fontBytes is given. A remote or local winner records a substitution Loss.


readonly optional fonts?: FontBytesByVariant

Defined in: src/core/converter/ream.ts:99

Explicit font bytes per variant (regular/bold/italic/bold-italic).


readonly optional footnotes?: ReadonlyMap<string, readonly BodyElement[]>

Defined in: src/layout/styled-layout.ts:233

§17.11 notes content by id. Footnotes render in a reserved band at the bottom of the referencing page; endnotes flow after the body.

StyledRenderOptions.footnotes


readonly optional gridLinePitchPt?: Pt

Defined in: src/layout/styled-layout.ts:226

§17.6.5 — the pitch of the document grid the text is laid on. Set by the layout itself, per section (see SectionRenderCtx.options); callers state it on the section, not here.

StyledRenderOptions.gridLinePitchPt


readonly optional gutterAtTop?: boolean

Defined in: src/layout/styled-layout.ts:318

ECMA-376 §17.15.1.38 w:gutterAtTop — the binding space belongs to the TOP margin, not the left.

StyledRenderOptions.gutterAtTop


readonly optional headersFooters?: ReadonlyMap<string, readonly BodyElement[]>

Defined in: src/layout/styled-layout.ts:228

Header/footer body content keyed by relationship id.

StyledRenderOptions.headersFooters


readonly optional hyphenator?: Hyphenator

Defined in: src/layout/styled-layout.ts:266

Optional Liang hyphenator. When set, each word token is split at allowed hyphenation positions and offered to Knuth-Plass as potential break points (with a small disincentive). Improves justified paragraph rags.

StyledRenderOptions.hyphenator


readonly optional images?: "dataUri" | "link" | "drop"

Defined in: src/core/converter/ream.ts:137

Markdown only: how a picture reaches the output — inlined as a data: URI (the default), named under ./media/ for a caller that writes the bytes itself, or dropped. See MarkdownWriteOptions.


readonly optional info?: DocumentInfo

Defined in: src/layout/styled-layout.ts:271

Optional /Info dictionary metadata (ISO 32000-1 §14.3.3). Unset fields are omitted; if any field is set a PDF /Info entry is emitted.

StyledRenderOptions.info


readonly optional language?: string

Defined in: src/layout/styled-layout.ts:300

Document natural language (BCP 47, e.g. "en-US", "ru-RU") for the tagged-PDF catalog /Lang (§14.9.2). Defaults to "en-US". The docx converter fills this from the document’s default w:lang.

StyledRenderOptions.language


readonly optional layoutProfile?: LayoutProfile

Defined in: src/layout/styled-layout.ts:191

Renderer-compatibility profile for the line-height model (default 'ream').

StyledRenderOptions.layoutProfile


readonly optional marginBottom?: number

Defined in: src/layout/styled-layout.ts:260

StyledRenderOptions.marginBottom


readonly optional marginLeft?: number

Defined in: src/layout/styled-layout.ts:257

StyledRenderOptions.marginLeft


readonly optional marginRight?: number

Defined in: src/layout/styled-layout.ts:258

StyledRenderOptions.marginRight


readonly optional marginTop?: number

Defined in: src/layout/styled-layout.ts:259

StyledRenderOptions.marginTop


readonly optional now?: Date

Defined in: src/core/converter/ream.ts:125

Reference date for spreadsheet conditional-format timePeriod rules and for TODAY()/NOW() in expression rules (E-SHEET W9). Supplying it re-projects a spreadsheet source so those clock-relative rules resolve against this date — an explicit input, never the wall clock. Omitted, they no-op and the output is unchanged.


readonly optional numbering?: Numbering

Defined in: src/layout/styled-layout.ts:209

§17.9 numbering definitions; applied to list paragraphs before layout.

StyledRenderOptions.numbering


readonly optional pageBackgroundColorHex?: string

Defined in: src/layout/styled-layout.ts:311

ECMA-376 §17.2.1 w:background — the colour every page is painted before anything else is drawn on it. Absent ⇒ the paper’s own white.

StyledRenderOptions.pageBackgroundColorHex


readonly optional pageBackgroundFill?: ShapeFill

Defined in: src/layout/styled-layout.ts:313

§17.2.1 — the background’s gradient or picture, when it has one.

StyledRenderOptions.pageBackgroundFill


readonly optional pageBreaks?: "drop" | "rule"

Defined in: src/core/converter/ream.ts:143

Markdown only: what a page break becomes — nothing (the default), or the --- thematic break a slide deck wants between its slides. See MarkdownWriteOptions.


readonly optional pageHeight?: number

Defined in: src/layout/styled-layout.ts:256

StyledRenderOptions.pageHeight


readonly optional pageWidth?: number

Defined in: src/layout/styled-layout.ts:255

StyledRenderOptions.pageWidth


readonly optional pdfA?: PdfALevel

Defined in: src/layout/styled-layout.ts:281

When set, emit a PDF/A-conformant file: an OutputIntent with an embedded sRGB ICC profile, document XMP /Metadata (the pdfaid identifier), /ID, and subset-tagged fonts with a /CIDSet. The profile picks the rest: part 1 → PDF 1.4 + flattened image alpha (no transparency); part 2/3 → PDF 1.7 + preserved transparency (image /SMask + page group); part 3 → may carry embedded associated files (see attachments); level a → tagged (logical structure); b → visual; u → b + Unicode mapping.

StyledRenderOptions.pdfA


readonly optional pdfUA?: boolean

Defined in: src/layout/styled-layout.ts:294

PDF/UA-1 (ISO 14289-1): implies tagged; the XMP carries pdfuaid:part=1 and the document always gets a title (AT announces it). Combines freely with pdfA level-a profiles.

StyledRenderOptions.pdfUA


readonly optional registriesByFamily?: ReadonlyMap<SubstituteKey, FontRegistry>

Defined in: src/layout/styled-layout.ts:199

Per-run font resolution: when supplied, each text run picks the registry of its declared family (sans→arimo / serif→tinos / mono→cousine via the run’s w:ascii) instead of always using registry. Absent ⇒ single-family (every run uses registry), byte-identical to before. registry remains the guaranteed fallback for math/chart/default glyphs and any missing family.

StyledRenderOptions.registriesByFamily


readonly optional resources?: ResourceStore

Defined in: src/layout/styled-layout.ts:249

Content-addressed binary store; image nodes reference it by ResourceId.

StyledRenderOptions.resources


readonly optional section?: SectionProperties

Defined in: src/layout/styled-layout.ts:214

Single-section legacy entry-point. If sections is set it takes precedence and section is ignored.

StyledRenderOptions.section


readonly optional sections?: readonly Section[]

Defined in: src/layout/styled-layout.ts:220

ECMA-376 §17.6 — ordered list of sections. Each section’s endIndex is the exclusive bound into the body array (section N covers body[sections[N-1].endIndex..sections[N].endIndex)).

StyledRenderOptions.sections


readonly optional sheetNames?: boolean

Defined in: src/core/converter/ream.ts:150

Markdown from a SPREADSHEET only: open each sheet with a heading carrying its tab name. On by default — markdown has no pages to tell one sheet from the next by, so without them a workbook is a pile of tables with nothing to say which is which. Set false for the bare tables.


readonly optional signature?: SignatureOptions

Defined in: src/core/converter/ream.ts:117

Digitally sign the output (ISO 32000 §12.8, WebCrypto).


readonly optional signaturePlaceholder?: SignaturePlaceholder

Defined in: src/layout/styled-layout.ts:338

Emit an (invisible) signature field + signature dictionary with placeholder /ByteRange and /Contents (ISO 32000 §12.8). The result is an UNSIGNED PDF; pass it to signPdf() to fill the placeholder with a real PKCS#7 signature.

StyledRenderOptions.signaturePlaceholder


readonly optional strict?: boolean

Defined in: src/core/converter/ream.ts:113

Throw ConversionLossError on the first loss instead of reporting it.


readonly optional tagged?: boolean

Defined in: src/layout/styled-layout.ts:288

Emit a tagged PDF (ISO 32000-1 §14.8): a /StructTreeRoot describing reading order, marked content (BDC/EMC + MCID) on body text, and /Artifact marking of page decoration. Implied by pdfA: 'PDF/A-1a'. Independent of PDF/A otherwise (a plain tagged PDF is useful on its own).

StyledRenderOptions.tagged