Skip to main content

CSS Paged Media

By default, PDF conversion treats your HTML as a continuous document — pages are created mechanically to fit the content, with no awareness of individual page boundaries.
CSS Paged Media is the W3C standard that defines exactly these typographic capabilities. Two open-source libraries bring full CSS Paged Media support to PolyDoc — include one in your HTML and PolyDoc will pick it up automatically during rendering.

Feature comparison

FeatureDefaultPaged.jsVivliostyle
@page size & margin
Page breaks (break-*)
Header & footer (page numbers, static content)
Dynamic header content (e.g. current chapter title)
Per-page-type styles (cover, left/right pages)
Cross-references (target-counter)
Named pages (e.g. landscape sections)
Bleeds & crop marksPartial
EPUB / vertical writing
Default = PolyDoc without a polyfill library.