Summary
When rendering the DC template DOCX in SuperDoc (Layout Engine ON), pagination drifts cumulatively compared to Word/PDF.
This is not an isolated section-05 bug; vertical drift appears earlier and accumulates until page boundaries diverge.
Impact
This is a source-of-truth fidelity issue for enterprise/legal documents where section starts and page boundaries must match Word/PDF output.
Fixture
- Document:
DC_Template_Descricao_Cargo.docx
- Baseline: Word export / PDF of same DOCX
- SuperDoc mode: Layout Engine ON (DomPainter visible output)
Observed mismatch
- In Word/PDF, section 05 continues on page 3.
- In SuperDoc, section 05 is fully consumed on page 2, and page 3 starts at section 06.
- Drift continues in later pages (section/page starts do not align with Word/PDF).
Repro steps
- Open
DC_Template_Descricao_Cargo.docx in SuperDoc with Layout Engine ON.
- Compare pages 2-4 with Word/PDF export of the same DOCX.
- Observe that post-table spacing and section start positions are higher in SuperDoc than Word/PDF.
- Observe page-break divergence (notably around sections 05/06 and later sections).
Expected
SuperDoc page composition (section starts, table-to-heading spacing, page breaks) should match Word/PDF for this fixture.
Actual
SuperDoc produces less vertical consumption across repeated sections/tables, causing cumulative upward drift and earlier section starts.
What we investigated
1) Renderer/path ownership
- Confirmed with Layout Engine ON that visible output is DomPainter path.
- Drift is present in layout snapshot data before final paint, so this is not only a paint-layer issue.
2) Whole-document behavior
- Section 05 was initially used as a visible example, but analysis of the whole document shows cumulative drift from earlier sections.
- Repeated sections with similar table structures show repeated interval under-spacing.
3) Structural evidence
- Rows/cells are present; this is not a missing table rows ingestion issue.
- The issue behaves like vertical measurement/accounting mismatch rather than dropped content.
4) OOXML signal identified
- Fixture contains
w:docGrid w:linePitch="360" (24px at 96dpi).
- Hypothesis: Word grid-aware vertical behavior is not fully reflected end-to-end in SuperDoc measurement/layout for this scenario.
5) Attempted fix branch status
- A local PR investigation branch attempted constrained propagation/measurement changes.
- Visual parity was still not fully achieved end-to-end.
- I intentionally did not keep this as an upstream PR candidate.
Screenshot package (Word vs SuperDoc)
- Individual files:
- Superdoc:

- Word:
DC_Template_Descricao_Cargo.docx
Environment
- OS: Windows
- Local validation date: May 13, 2026
- Rendering mode: Layout Engine ON
Request
Please triage as a layout-fidelity bug (Word/PDF parity) with emphasis on cumulative vertical accounting across repeated table/section structures, not only the section-05 boundary symptom.
Summary
When rendering the DC template DOCX in SuperDoc (Layout Engine ON), pagination drifts cumulatively compared to Word/PDF.
This is not an isolated section-05 bug; vertical drift appears earlier and accumulates until page boundaries diverge.
Impact
This is a source-of-truth fidelity issue for enterprise/legal documents where section starts and page boundaries must match Word/PDF output.
Fixture
DC_Template_Descricao_Cargo.docxObserved mismatch
Repro steps
DC_Template_Descricao_Cargo.docxin SuperDoc with Layout Engine ON.Expected
SuperDoc page composition (section starts, table-to-heading spacing, page breaks) should match Word/PDF for this fixture.
Actual
SuperDoc produces less vertical consumption across repeated sections/tables, causing cumulative upward drift and earlier section starts.
What we investigated
1) Renderer/path ownership
2) Whole-document behavior
3) Structural evidence
4) OOXML signal identified
w:docGrid w:linePitch="360"(24px at 96dpi).5) Attempted fix branch status
Artifacts / archive
Screenshot package (Word vs SuperDoc)
DC_Template_Descricao_Cargo.docx
Environment
Request
Please triage as a layout-fidelity bug (Word/PDF parity) with emphasis on cumulative vertical accounting across repeated table/section structures, not only the section-05 boundary symptom.