A javascript client for BreezyPDFLite, a one-click-to-deploy microservice for converting HTML to PDF with Google Chrome. Send the library a chunk of HTML, get a PDF of it back. Configure how the PDF is rendered via meta
tags in the HTML.
$ yarn add breezy-pdf-lite-client
const BreezyPDFLite = require('breezy-pdf-lite-client')
const breezyPDFLite = new BreezyPDFLite({
baseUrl: 'https://YOURINSTANCEOFBREEZYPDFLITE.herokuapp.com',
secretApiKey: 'YOURSECRETAPIKEYFROMYOURINSTANCE'
})
await pdf = breezyPDFLite.render('<html>....</html>')
// Download as a file
const file = await pdf.toFile('path')
// Direct Readable Stream
const stream = pdf.stream()
stream.pipe(yourWritableStream)
See LICENSE
.