What is Paged.js

Paged.js is an open-source library to display paginated content in the browser and to generate print books using web technology.

It contains a set of handlers for CSS transformations and fragmented layout which polyfill the Paged Media and Generated Content CSS modules, along with hooks to create new handlers for custom properties.

The currently supported properties can be found on the Paged.js website.

Example

This example uses the repo by Ashok Khanna to generate a PDF. The code can be found here.

import Doczilla from '@doczilla/node'

const doczilla = new Doczilla('<your token>')

const pdf = await doczilla.pdf.direct({
  page: {
    url: 'https://doczilla-app.github.io/paged.js-example/'
  },
  pdf: {
    format: 'a4'
  }
})

Output