Repository navigation
feat: paged-media CSS generation for running footers - #581
Merged
Merged
Conversation
…ning footers Add render-vivliostyle.mjs (dependency-free) with: - generatePagedMediaCss() for @page rules with running footer - wrapHtmlForPrintRendering() to embed CSS in HTML - Support for issuer, date, identity, page number in footer - Landscape pages for wide diagrams, typography rules, page breaks Implements the paged-media CSS generation specified in PDF_RENDERING_ENGINE.md. All tests pass; ready for Vivliostyle integration in the document rendering pipeline. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
transitrix
force-pushed
the
methodology/538-running-footer-paged-media
branch
from
September 2, 2026 18:40
184900d to
5893cb8
Compare
…atus lines Signed-off-by: transitrix <automation@transitrix.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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
Adds running-footer paged-media CSS: issuer, date, document identity, and page number on every page.
What's new
New module:
packages/document-renderer/src/render-vivliostyle.mjs(dependency-free)generatePagedMediaCss(metadata)— generates CSS with:@pagerule for A4 (595 × 842 pt) with 20mm margins@bottom-centerrunning footer showing issuer, date, identity, commit, page number@page :firstsuppression (title page has no footer)@page landscapefor wide diagrams (A4 rotated: 842 × 595 pt)wrapHtmlForPrintRendering(html, metadata)— returns complete HTML document with embedded CSSNew tests:
packages/document-renderer/tests/test_paged_media_css.mjsSpec update:
packages/document-renderer/PDF_RENDERING_ENGINE.mdArchitecture
document-renderer) stays dependency-freedocuments-cli)Next steps
documents-cli: wire Vivliostyle call with generated HTML + CSSTesting
cd packages/document-renderer node tests/test_paged_media_css.mjs