PSPDFKit-labs / pspdfkit-processor-invoice-from-html

Project showcasing creation of invoices from a HTML with PSPDFKit Processor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Project showcasing creation of invoices from a HTML with PSPDFKit Processor


Languages

Language:JavaScript 50.1%Language:HTML 49.9%