1.0.1 • Published 6 years ago
html2pdf-standalone v1.0.1
html2pdf-standalone
Based on html2pdf.it, but as a standalone node library (not a webservice). For usage in an existing application.
Generate PDFs from any web-page. You need Node.js to run it.
See it in action at: html2pdf.it.
Install
npm install
Page breaks
You can use the CSS attribute:
page-break-before: always;
Data URIs
You can use data URIs like the following to generate PDFs for arbitrary HTML:
data:text/html;encoding=utf-8,<h1>Hello</h1>
As described on Wikipedia, the data URI should have the following format:
data:[<media type>][;base64],<data>
License
MIT