1.0.0 • Published 4 years ago

pdfly v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

pdfly Travis CI Build Status

Generate a pdf from html.

NPM Badge

Install

npm install pdfly

Usage

const { promises: fs } = require("fs")
const pdfly = require(".")

const html = await fs.readFile("file.html", "utf8")
const pdf = await pdfly(html)

await fs.writeFile("output.pdf", pdf)

API

pdfly(html, options?)

html

Type: string

The html to generate the pdf from.

options

Type: object

Options to pass to puppeteer.