Repository navigation
fix: pdf table header alignment issue - #2259
Merged
Philipinho merged 2 commits intoJun 17, 2026
Merged
Conversation
Member
|
Thanks for your contribution. |
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.
Summary
Fixes #2248.
This PR fixes table header alignment in PDF/print output. Table headers could appear shifted down when exporting or previewing a page as PDF.
The issue was caused by PDF rendering reusing the normal read-only editor extension setup, which includes interactive table behavior intended for screen viewing. In particular, table header pinning and readonly table sorting can add sticky/relative positioning, transforms, chevrons, and extra header padding. Those behaviors are useful in the browser, but they should not affect static PDF output.
This PR adds a print-specific render mode for
ReadonlyPageEditorand uses it from the dedicated PDF render page. In that mode, the editor skips the interactive table header extensions so tables render as static document content for PDF generation.Changes
printModeprop toReadonlyPageEditor.printModeis enabled,ReadonlyPageEditorexcludes:tableHeaderPintableReadonlySortprintModewhen rendering page content for PDF export.Why This Approach
PDF output should be static and deterministic. Interactive table features such as sticky headers and sort controls are screen-only behavior, and they can interfere with browser print layout.
Instead of changing table behavior globally, this PR scopes the behavior change to the PDF render path. Normal page editing and normal read-only page viewing are preserved.
This keeps the fix narrow:
The print CSS fallback is included to make browser print and Save as PDF more robust in case any table header pin/sort styles are already present when print media styles are applied.
Manual Testing
Tested manually with a page containing a table with a real header row and body rows.
Verified:
Also ran:
The client build passed successfully.
Notes
This PR intentionally does not modify the server-side HTML/Markdown export service because the reported issue is in the browser PDF/print rendering path, not in HTML or Markdown export serialization.