Repository navigation
Add a headerRows table option to repeat rows on new pages - #1849
Merged
Merged
Conversation
# Conflicts: # CHANGELOG.md
kroplabeskidu
force-pushed
the
table-header-rows
branch
from
November 1, 2026 15:42
992cea5 to
7e1760e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Feature. Fixes #1657
The first rows are drawn again at the top of each new page, and the next row goes below them. If that row wouldn't fit below the header, the header is skipped on that page. In a structured table the repeated rows are marked as pagination artifacts, so they aren't added to the structure again.
Compared with similar APIs:
headerRows: 1repeatRows=1table(data, header: true)showHead: 'everyPage'I used
headerRowsfrom pdfmake, since it is a JS library with the same data shape, and a count also covers several header rows.I checked a 3 page table with pdf.js, with and without
structParent: every page starts with the header and the next row sits below it.A header at the very bottom of a page can still be left alone there, and a
rowSpanreaching past the header rows isn't repeated.Checklist: