Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 947 Bytes

File metadata and controls

31 lines (19 loc) · 947 Bytes

Creating invoice from HTML with PSPDFKit Processor

This is a small project in Node.js which creates invoices from an HTML template using PSPDFKit Processor.

See the accompanying blog post at https://pspdfkit.com/blog/2021/how-to-generate-pdf-from-html-with-nodejs.

How-to

Written with Node.js 14.7.0. To use it, clone the repository and run:

npm install

Then start the Processor. If you have a license key, run:

docker run --rm -p 5000:5000 -e LICENSE_KEY=YOUR_LICENSE_KEY_GOES_HERE pspdfkit/processor

And if you don't, you can start the Processor in trial mode with:

docker run --rm -p 5000:5000 pspdfkit/processor

After that, you can create the invoice by running node generate.js - the resulting PDF file will be saved at ./invoice.pdf.

Credits

  • Inter font family by The Inter Project Authors.