Skip to content

Rendering Capabilities

This page summarizes what the current vyuh_docx PDF renderer is designed to handle and where reviewers should look when fidelity questions come up.

Document Structure

CapabilityNotes
SectionsPage size, margins, header/footer distance, columns, page borders, and background image metadata.
ParagraphsAlignment, spacing, indentation, borders, tabs, text wrapping, and explicit page breaks.
RunsFont family, size, bold, italic, underline, strike, color, highlight, hidden text, baseline alignment.
ListsNumbered and bulleted structures from DOCX or SFDT list data.
TablesGrid layout, cell widths, margins, spans, borders, row heights, row splitting, and repeated headers.
ImagesInline and block image nodes with authored extents where available.
ShapesModeled drawing and text-box data where represented in the AST.
Headers and footersRendered as section furniture with reserved body space.
CommentsComment metadata and anchors are preserved for round-trip/review surfaces.
RevisionsTracked-change metadata is preserved in the model.
TOCTable-of-contents blocks and cached content are represented.
Footnotes/endnotesFootnote content is represented; PDF placement currently uses end-of-document simplification.
Custom XMLCustom data-store parts are preserved through supported flows.

Layout Behavior

BehaviorImplementation area
Page paginationPdfLayoutEngine.paginate
Explicit layout modelPdfLayoutDocument, PdfLayoutPage, PdfLayoutBox
Multi-column sectionsSection-aware layout engine configuration
Header/footer reservePdfExporter measures furniture reserve before paginating body content
Table splittingTable layout boxes and row continuation logic
Repeated table headersTable layout metadata
Default tab stopsPdfExporter reads w:defaultTabStop or uses the OOXML default
WatermarksPdfExporter paints diagonal text on each page
PDF metadataPdfDocumentWriter receives deterministic creation date when configured

Font Behavior

The renderer has two modes:

ModeBehavior
Lenient fontsMissing glyphs fall back where possible. This is the default for general rendering.
strictFonts: trueMissing glyphs throw instead of silently disappearing. Use this for controlled copies.

Hosts can call PdfExporter.registerFont(fontFamily, bytes) before export to make the renderer use supplied fonts.

Source Compatibility

The same DocxBuiltDocument model can come from:

  • DocxReader for DOCX;
  • SfdtReader for Syncfusion JSON;
  • docx() and DocxDocumentBuilder for generated content;
  • HtmlParser or MarkdownParser for imported lightweight content.

Renderer features should work from any source that populates the required model fields. If a path loses fidelity, inspect the reader/exporter first to verify the source property reaches the AST.

Not Owned By The Renderer

The renderer does not decide:

  • who can view or edit a document;
  • whether a PDF is a controlled copy;
  • which copy number to allocate;
  • whether an electronic signature is valid;
  • whether a lifecycle state allows editing;
  • where bytes are stored.

Those are docx_editor and host application responsibilities.