1.0.7 • Published 2 months ago

html-to-pdf-headless v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

html-to-pdf-headless

Here is the node pkg by you can create pdf in a simple way without any external headless browser like puppeteer etc.

Dependency

JSDOM, HTML-TO-PDFMAKE, PDFMAKE

Install

npm i html-to-pdf-headless

Usage

const htmlToPdfHeadless = require("html-to-pdf-headless"); htmlToPdfHeadless.createPdf(HTML, styles)

Styles

styles = { "html-h1": { color: "#003366", background: "white", } }

Note

It'll return the buffer you can convert in the raw file by Using # getBuffer method. Example - htmlToPdfHeadless.createPdf(HTML, styles).getBuffer(function (buffer) { fs.writeFileSync({path}, buffer); })

1.0.7

2 months ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago