Repository navigation
fix(html): print a text page with a page frame whole - #1199
Merged
Merged
Conversation
A frame anchored to the page stands off the page edge. The print rules put the margins of a text page on the sheet, so the page box began at the margin and every page frame moved by the left and top margins. In a letter template the header ran into the body and the footer went to a second sheet. Print such a page whole, with its margins in the box, as a slide prints. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S5yx1nDeVcNX3BxqK1WpJz
andiwand
force-pushed
the
fix/print-page-anchored-frames
branch
from
October 10, 2026 09:22
c98b540 to
a637561
Compare
andiwand
added a commit
that referenced
this pull request
Oct 10, 2026
…paces The output now prints a text page with a page frame whole (#1199), and reads a space before an ods function's parenthesis (#1198). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S5yx1nDeVcNX3BxqK1WpJz
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.
#1197 puts the margins of a text page on the printed sheet (
@page), so text that runs past one sheet keeps its margins. But a frame anchored to the page has a position from the page edge (left:2cm;top:1cmin.odr-page-outer). In print, the page box now begins at the margin, so every page frame moves by the left and top margins.Before
I printed the 79 changed full-document pages of the public reference output with Chrome (CDP
Page.printToPDF) and compared the result with the LibreOffice PDF export of the originals. Only one page got worse than before #1197:odt/Din_5008_business_letter.ott. Its top margin is 9.85 cm. The header picture and the address blocks moved down into the body text, and the footer went to a second sheet.Change
A text page with a frame anchored to the page is a fixed layout, like a letter template. It prints as a slide prints:
@page{size:…;margin:0}, with the margins kept in the page box. Text without such a frame keeps the #1197 behavior.Verification
html.a_text_page_with_a_frame_on_the_page_prints_whole: a page anchor gives@page{margin:0}, and a paragraph anchor keeps the margins on the sheet.@page:first{margin-top:0}, side margins in the box) still pushed the footer to a second sheet, so I did not use it.Reference output
In the public corpus, only
odt/Din_5008_business_letter.ott/document.htmlchanges. The private corpus may have more. I will update the reference output once, after this PR and #1198 have landed.