test(html): keep page margins in the output tests - #672
Merged
Conversation
`text_document_margin` was left at its default, so every text document in the reference output was rendered reflowed to the viewport. The Android viewer defaults the setting to on, which means the output the tests have been showing is the one most readers never see, and the paged path — page box, backdrop, fit-width viewport — was covered by nothing at all. Turn it on. Only text documents move; presentations and drawings are paged either way, and spreadsheets ignore the setting. 101 reference files gain the `.odr-pages` / `.odr-page-outer` / `.odr-page-inner` boxes and lose `initial-scale=1.0`; the pins follow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ACZ1RcX9pxoMZWBaTdDRU
andiwand
force-pushed
the
test/output-paging
branch
from
August 9, 2026 13:00
1f38185 to
ee7fcbf
Compare
andiwand
marked this pull request as ready for review
August 9, 2026 13:02
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.
html_output_test.cpplefttext_document_marginat its default, so every text document in the reference output was rendered reflowed to the viewport.The Android viewer defaults the setting to on (
PaginationSetting.DEFAULT_ENABLED— "On unless the user says otherwise: the margins are the document as it was written."). So the output the tests have been showing is the one most readers never see, and the paged path was covered by nothing at all.What changes
Only text documents move — presentations and drawings are paged either way, and spreadsheets ignore the setting. For those 48 files the output gains:
<body class="odr-body odr-background">and the.odr-pages/.odr-page-outer/.odr-page-innerboxes, carrying the document's real page size and marginsinitial-scale=1.0, sinceis_paged_contentnow holds for textWorth being precise about the name: the flag is the page margins, not pagination. The document stays one continuous sheet — it does not break into pages.
Test plan
odr_test --gtest_filter='*HtmlOutput*'— 234 passed, 9 skipped (the pre-existing skips), 0 failedodt/,docx/,doc/, … change🤖 Generated with Claude Code