You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Worksheet drawings anchored to the same row are emitted as consecutive flow boxes instead of overlays at their worksheet coordinates. Three shapes that Excel renders side by side on row 3 therefore form a diagonal vertical stack in office2pdf. The reserved flow height also spills onto an extra blank PDF page.
Found while re-auditing the regression fixture in #434 at 150 DPI against a native Microsoft Excel export.
Reproduction
Use tests/fixtures/xlsx/theme_color_drawing.xlsx from PR #434 after its print layout is updated to A4 landscape at 100% zoom.
The drawing contains three xdr:twoCellAnchor elements with the same row interval (3:9) and different column intervals (B:D, F:H, J:L).
Expected
All three shapes share the same top and bottom coordinates, as in Excel.
The workbook exports to one A4 landscape page.
Drawing overlays do not reserve flow height.
Actual
Excel GT top coordinates at 150 DPI: 188, 188, 188.
office2pdf top coordinates: 246, 486, 726.
Excel GT page count: 1.
office2pdf page count: 2; page 2 is blank.
The CLI metric reports Pages: 1, so the extra page is introduced during Typst layout rather than XLSX parsing.
Root-cause evidence
generate_table_with_anchors emits every same-row anchor sequentially. generate_sheet_anchor wraps each text box in #box(width: 100%, height: ...), which advances the flow before the next same-row drawing. It does not preserve a drawing-level vertical offset.
Visual checklist
Page count/order: one extra blank page.
Element presence/content: title and all three labels are present.
Position: second and third shapes are displaced downward by one reserved box height each.
Summary
Worksheet drawings anchored to the same row are emitted as consecutive flow boxes instead of overlays at their worksheet coordinates. Three shapes that Excel renders side by side on row 3 therefore form a diagonal vertical stack in office2pdf. The reserved flow height also spills onto an extra blank PDF page.
Found while re-auditing the regression fixture in #434 at 150 DPI against a native Microsoft Excel export.
Reproduction
Use
tests/fixtures/xlsx/theme_color_drawing.xlsxfrom PR #434 after its print layout is updated to A4 landscape at 100% zoom.The drawing contains three
xdr:twoCellAnchorelements with the same row interval (3:9) and different column intervals (B:D,F:H,J:L).Expected
Actual
188,188,188.246,486,726.1.2; page 2 is blank.Pages: 1, so the extra page is introduced during Typst layout rather than XLSX parsing.Root-cause evidence
generate_table_with_anchorsemits every same-row anchor sequentially.generate_sheet_anchorwraps each text box in#box(width: 100%, height: ...), which advances the flow before the next same-row drawing. It does not preserve a drawing-level vertical offset.Visual checklist
Related: #240, #430, #434