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
| Capability | Notes |
|---|---|
| Sections | Page size, margins, header/footer distance, columns, page borders, and background image metadata. |
| Paragraphs | Alignment, spacing, indentation, borders, tabs, text wrapping, and explicit page breaks. |
| Runs | Font family, size, bold, italic, underline, strike, color, highlight, hidden text, baseline alignment. |
| Lists | Numbered and bulleted structures from DOCX or SFDT list data. |
| Tables | Grid layout, cell widths, margins, spans, borders, row heights, row splitting, and repeated headers. |
| Images | Inline and block image nodes with authored extents where available. |
| Shapes | Modeled drawing and text-box data where represented in the AST. |
| Headers and footers | Rendered as section furniture with reserved body space. |
| Comments | Comment metadata and anchors are preserved for round-trip/review surfaces. |
| Revisions | Tracked-change metadata is preserved in the model. |
| TOC | Table-of-contents blocks and cached content are represented. |
| Footnotes/endnotes | Footnote content is represented; PDF placement currently uses end-of-document simplification. |
| Custom XML | Custom data-store parts are preserved through supported flows. |
Layout Behavior
| Behavior | Implementation area |
|---|---|
| Page pagination | PdfLayoutEngine.paginate |
| Explicit layout model | PdfLayoutDocument, PdfLayoutPage, PdfLayoutBox |
| Multi-column sections | Section-aware layout engine configuration |
| Header/footer reserve | PdfExporter measures furniture reserve before paginating body content |
| Table splitting | Table layout boxes and row continuation logic |
| Repeated table headers | Table layout metadata |
| Default tab stops | PdfExporter reads w:defaultTabStop or uses the OOXML default |
| Watermarks | PdfExporter paints diagonal text on each page |
| PDF metadata | PdfDocumentWriter receives deterministic creation date when configured |
Font Behavior
The renderer has two modes:
| Mode | Behavior |
|---|---|
| Lenient fonts | Missing glyphs fall back where possible. This is the default for general rendering. |
strictFonts: true | Missing 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:
DocxReaderfor DOCX;SfdtReaderfor Syncfusion JSON;docx()andDocxDocumentBuilderfor generated content;HtmlParserorMarkdownParserfor 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.