html-to-pdf 3.1.9
Install from the command line:
Learn more about npm packages
$ npm install @lesjoursfr/html-to-pdf@3.1.9
Install via package.json:
"@lesjoursfr/html-to-pdf": "3.1.9"
About this version
Generate PDF from HTML with simple API in Node.js.
This library use electron to generate PDF files from HTML.
Install the lib and add it as a dependency :
npm install @lesjoursfr/html-to-pdf
Then put this in your code:
const { PDF } = require("@lesjoursfr/html-to-pdf");
const pdf = new PDF(target, output);
pdf.render()
.then(() => {
console.log("PDF Generated Successfully!")
})
.catch((err) => {
console.error("Failed to generate PDF because of ", err)
});
);
-
target
: The URL of the HTML page -
output
: The PDF file path
Details
- html-to-pdf
-
lesjoursfr
- 3 months ago
- MIT
- 15 dependencies
Assets
- html-to-pdf-3.1.9.tgz
Download activity
- Total downloads 42
- Last 30 days 0
- Last week 0
- Today 0