Skip to content

XLSX: the print-heading frame leaves the gutter's bottom span open at Typst-chosen page breaks, so intermediate pages are not fully framed #722

Description

@developer0hye

Summary

The #623 print-heading frame closes every page's bottom edge only where a band source
exists at the break. On Typst-flowed intermediate pages the bottom rule across the data
area comes from the #622 gridline closure seeds, but the row-number gutter's span has no
seed there — its bottom band is emitted only on the last row of the table (or at
parser-level breaks). GT closes the frame across the full width, gutter included, on every
page. With gridlines off, the entire intermediate-page bottom edge would be unframed.

The mechanism is documented in resolve_boundary_painted_borders
(crates/office2pdf/src/render/typst_gen_tables.rs): codegen cannot see Typst-chosen page
breaks, so per-page bottom frames exist only where a per-row band (gridline seed or last-row
frame band) happens to coincide with the break.

Measured (NumberFormatTests.xlsx, Tests sheet, intermediate pages)

GT (Excel, every page) office2pdf (Typst-flowed pages)
bottom frame across gutter span [54,77] present, 1pt black absent
bottom rule across data span present present (gridline seeds)
last page bottom frame present, full width present, full width

Reproduction

cargo run -p office2pdf-cli -- tests/fixtures/xlsx/poi/NumberFormatTests.xlsx -o out.pdf
mutool draw -F trace -o - out.pdf 3 | grep stroke   # bottom edge: data span ruled, gutter span open

Expected

Every printed page's bottom edge is framed across the full block width — heading gutter
included — as Excel prints it.

Actual

Intermediate Typst-flowed pages leave the gutter's 23pt bottom span open (and would leave
the whole bottom open with gridlines off); only the final page and parser-level breaks get
the full frame.

Related: #623

Found in: the #623 fix-PR visual audit (local Excel-for-Mac GT, 150 DPI, 2026-07-30). Visual comparison below.

Visual comparison

Compare
Compare

GT (intermediate page, frame closed) left, office2pdf (intermediate page, gutter bottom span open) right, 150 DPI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions