Skip to content

ReamConvertOptions

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

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:290

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:231

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:224

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:216

§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 embeddedFonts?: ReadonlyMap<string, FontRegistry>

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

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:80

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


readonly optional encrypt?: PdfEncryptOptions

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

§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:211

StyledRenderOptions.endnotes


readonly optional fontBytes?: Uint8Array<ArrayBufferLike>

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

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


readonly optional fontFamily?: string

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

Substitute family hint for the auto-download path.


readonly optional fontFetch?: FetchLike

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

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


readonly optional fontProviders?: readonly FontProvider[]

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

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:64

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


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

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

§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 headersFooters?: ReadonlyMap<string, readonly BodyElement[]>

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

Header/footer body content keyed by relationship id.

StyledRenderOptions.headersFooters


readonly optional hyphenator?: Hyphenator

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

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 info?: DocumentInfo

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

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:277

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:174

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

StyledRenderOptions.layoutProfile


readonly optional marginBottom?: number

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

StyledRenderOptions.marginBottom


readonly optional marginLeft?: number

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

StyledRenderOptions.marginLeft


readonly optional marginRight?: number

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

StyledRenderOptions.marginRight


readonly optional marginTop?: number

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

StyledRenderOptions.marginTop


readonly optional now?: Date

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

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:192

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

StyledRenderOptions.numbering


readonly optional pageHeight?: number

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

StyledRenderOptions.pageHeight


readonly optional pageWidth?: number

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

StyledRenderOptions.pageWidth


readonly optional pdfA?: PdfALevel

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

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:271

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<FamilyKey, FontRegistry>

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

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:226

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

StyledRenderOptions.resources


readonly optional section?: SectionProperties

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

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:203

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 signature?: SignatureOptions

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

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


readonly optional signaturePlaceholder?: SignaturePlaceholder

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

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:78

Throw ConversionLossError on the first loss instead of reporting it.


readonly optional tagged?: boolean

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

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