Skip to content

DOCX: preserve Word table row height from cell content and margins #336

Description

@developer0hye

Summary

DOCX table rows render shorter than Microsoft Word even when cell margins are parsed. In the PR #187 fixture, Word's single row is approximately 52 pt tall, while the office2pdf row is approximately 32 pt tall.

Reproduction

Convert tests/fixtures/docx/pr_187_contributor_acceptance.docx and compare page 1 with a native Microsoft Word PDF export.

Expected

The row height reflects the effective top/bottom cell margins and the cell paragraph's Word-compatible line box and spacing.

Actual

The row is visibly compressed vertically. PR #187 preserves the partial and inherited margin values in the IR, but the resulting PDF still does not match Word's row height.

Visual comparison

Ground truth 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

Related to #187.

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