html2pdf-standalone

1.0.1 • Public • Published

[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

Package Sidebar

Install

npm i html2pdf-standalone

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • tonypee