pdf-from-html
pdf-from-html is a nodejs library to transform an html (possibly from markdown-it) in a PDF.
Installation
Install it with npm or yarn.
npm install pdf-from-html
yarn add pdf-from-html
Usage
It's possible to use it from command line
pdf-from-html docs/ somefile.html
as npm script
"scripts": {
"pdf": "pdf-from-html docs/ somefile.html"
},
or as part of your nodejs app
import { generatePDF } from 'pdf-from-html';
generatePDF(outputDir, outputFileName, inputContent);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Apache-2.0