html2pdf-node

1.0.8 • Public • Published

This is a node interface to openhtmltopdf (https://github.com/danfickle/openhtmltopdf) It requires JRE to be installed.

How to use

npm install html2pdf-node

const html2pdf = require("html2pdf-node");
const htmlSample = `<p>Hello</p>`;
html2pdf.generatePdfOfHtml(htmlSample)
        .then(pdfFilePath=>{
            console.log(pdfFilePath)
        })
        .catch(err=>{});

NOTES

This module contains java archive file (jar) with needed dependencies Ready to be used, you need JRE installed.

You can update the java code and build with npm run build-java-app

Run the JAVA APP

java -jar app.jar input_html_file_path output_pdf_file_path

Readme

Keywords

none

Package Sidebar

Install

npm i html2pdf-node

Weekly Downloads

35

Version

1.0.8

License

MIT

Last publish

Collaborators

  • marwan.hamdan