Skip to content

DOCX: large title paragraph under docGrid renders short, gap to body too small #402

Description

@developer0hye

Summary

The large title paragraph in 02_contract_ko.docx renders too short vertically and sits too high, leaving the title-to-first-body gap ~10pt short of Word. The per-body-paragraph grid rhythm is correct (fixed in #394), but the title region contributes a constant ~13.6pt upward offset carried through the rest of the page.

Measured (pdftotext at 72 DPI):

GT office2pdf
Title baseline (소프트웨어) 65.9 62.3
First body baseline (주식회사) 105.9 92.3
Title→body gap 40.0pt 30.0pt
Title glyph ink height 22.7pt 17.0pt

The title run is w:sz w:val="34" (17pt). Glyph widths match GT exactly (85.0pt), so the horizontal font size is correct, but the rendered glyph height differs (22.7 vs 17.0) — pointing at a font-substitution or line-box difference specific to the bold title line rather than the point size. Under the section's w:docGrid the title line snaps to a single 18pt grid line in office2pdf, whereas Word appears to give it more vertical room, widening the title-to-body gap.

Reproduction

Convert a Korean DOCX with a large bold title paragraph under a w:docGrid section and compare the title height and title-to-body gap against a Word PDF export at 150 DPI.

Expected

Title line height and the title-to-first-body gap match Word (gap ~40pt in the fixture).

Actual

Title renders ~5.7pt shorter and the gap is ~10pt short, shifting all subsequent content up by a constant ~13.6pt.

Related

Related: #394, #354

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