Skip to content

DOCX: per-row w:tcW preferences are ignored in auto-layout tables #355

Description

@developer0hye

Summary

Explicit table column widths (w:tblGrid/w:gridCol and w:tcW with w:type="dxa") are not honored. Columns render with substantially different proportions than Word.

In 01_invoice_en.docx the grid is 700 / 4200 / 1200 / 1450 / 1476 twips (# / Description / Qty / Unit Price / Amount) — Word prints a wide Description column and a narrow Qty column, while office2pdf renders Description much narrower and Qty/Unit Price far wider. The wide 7-column datasheet table in 07_product_spec_en.docx shows the same drift.

Reproduction

Convert a DOCX table with explicit unequal w:gridCol widths and compare column proportions with a Microsoft Word PDF export.

Expected

Column widths follow the document's grid definition.

Actual

Column proportions deviate strongly (Description compressed, numeric columns inflated), wrapping cell content that Word keeps on one line.

Related

Related: #235

Visual comparison

Ground truth (native Microsoft Office export) is on the left; office2pdf output at filing time is on the right. Both pages were rendered with pdftoppm at 150 DPI.

GT and office2pdf output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions