Paged.js: a Demo

Print Books with Browsers

Julie Blanc (@julieblancfr)
Publishing Fair Torino – November 24, 2019

Responsive web publications

HTML, CSS, JavaScript...

Electronic books



Web publications → HTML, CSS, JavaScript...

Electronic books → ePUB (HTML, CSS)

Print → Indesign HTML, CSS ?

Automated typesetting and pagination for print

Make PDF outputs of HTML contents from browsers

Flux → Pagination


  • Proprietary vs. open-source
  • (own) Rendering engines
  • Non-standard properties
  • No visual preview

What we need

  • Open and free tool(s)
  • Based on web standards
  • Visual preview
  • Automated workflows

A free and open source JavaScript library that paginates content in browser to create PDF outputs from any HTML content


  • Founder: Adam Hyde
  • Core team: Fred Chasen, Julie Blanc, Julien Taquet
  • Funding: Shuttleworth Foundation, Cabbage Tree Labq


How paged.js works ?

Semantic content (HTML)

CSS design

Paged.js script

Paginated display of content

Web developpement tools


In a web browser


Page size and margins

Symetric margins

Page breaks

Page breaks

Avoid page breaks

Page numbers

String-set (running headers and footers)

Pseudo class selectors for pages

Blank pages

Named pages

Columns layout

Cross references

Collection of scripts

External scripts


Bleed and marks

Live demo

Real life usages

Patrick Radden Keefe, Addiction sur ordonnance, C&F éditions

Not only textbooks

Web and printed publication for the Musée Saint-Raymond

What next for Paged.js ?


Page floats

MIT licence

Documentation - Website

Community (Mattermost)

What about the future ?

Advocate for better support of print-related standards
in browser engines

Fragmentation of the content (chunker)

Transformation of CSS declarations (polisher)

Preview (previewer)

Post Processing

  • pdf-lib (parsing and editing the structure)
  • hummus (visual updates)
  • Ghostscript (images and color color management)