The five element override objects let you tune how individual DOCX elements (tables, paragraphs, text runs, table cells, images) are rendered. Each override is forwarded to the underlying DOCX conversion library as a base default; per-node values from the document still win where they are computed.

No deep merging

Nested objects inside an override (for example borders, margins, transformation) are replaced entirely, not deep-merged. When customizing one side of a border, provide every side you need so undefined values do not slip through.

tableOverrides

Defaults applied to every table. Most useful properties:

PropertyTypeDescription
bordersObjectPer-side definitions for top, bottom, left, right, insideHorizontal, insideVertical. Each accepts { style, size, color }.
marginsObjectDefault cell margins { top, bottom, left, right } (twentieths of a point).
widthObjectTable width { size, type } where type is "pct", "dxa", or "auto".
layoutstring"fixed" or "autofit".
alignmentstring"left" | "center" | "right" | "start" | "end".
cantSplitbooleanPrevent the table from splitting across pages.
visuallyRightToLeftbooleanRender the table right-to-left.

paragraphOverrides

Defaults applied to every paragraph. Most useful properties:

PropertyTypeDescription
spacingObject{ before, after, line, lineRule } in twentieths of a point. line is overwritten by computed line height.
alignmentstring"left" | "center" | "right" | "justified" | "start" | "end".
indentObject{ left, right, firstLine, hanging, start, end } in twentieths of a point.
keepNextbooleanKeep this paragraph with the next one.
keepLinesbooleanKeep all lines in the paragraph together.
pageBreakBeforebooleanInsert a page break before the paragraph.
bidirectionalbooleanRender paragraph right-to-left.
stylestringReference to a paragraph style id defined in styleOverrides.

textRunOverrides

Defaults applied to every text run. Per-mark formatting (bold, italic, color, …) still overrides these values. Most useful properties:

PropertyTypeDescription
fontstringFont family name.
sizenumberFont size in half-points (24 = 12pt).
boldbooleanRender bold by default.
italicsbooleanRender italic by default.
underlineObject{ type, color } — e.g. { type: "single", color: "auto" }.
strikebooleanStrikethrough.
colorstringHex color without the leading # ("FF0000").
highlightstringPredefined highlight color name ("yellow", "green", …).
superScriptbooleanRender as superscript.
subScriptbooleanRender as subscript.

tableCellOverrides

Defaults applied to every table cell. Most useful properties:

PropertyTypeDescription
shadingObject{ fill, type, color } — e.g. { fill: "F0F0F0", type: "clear" }.
verticalAlignstring"top" | "center" | "bottom".
bordersObjectPer-side cell border definitions, same shape as tableOverrides.borders.
marginsObjectCell padding { top, bottom, left, right } in twentieths of a point.
widthObjectCell width { size, type }.

imageOverrides

Defaults applied to every image. Image dimensions computed from the document (intrinsic size or user-resized values) still win where present. Most useful properties:

PropertyTypeDescription
transformationObject{ width, height, rotation?, flip? } — pixels at 96 dpi.
altTextObject{ title, description, name }.
floatingObjectFloating positioning options (anchor, alignment, offset, wrap).