Skip to content

Javascript client for breezy-pdf-lite, an HTML -> PDF service powered by Google Chrome

License

Notifications You must be signed in to change notification settings

danielwestendorf/breezy-pdf-lite-client-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BreezyPDFLite

Build Status Coverage Status

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.

Installation

$ yarn add breezy-pdf-lite-client

Usage

Pragmatic Usage

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)

License

See LICENSE.

About

Javascript client for breezy-pdf-lite, an HTML -> PDF service powered by Google Chrome

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages