Small service for generating PDF files with nodejs, handlebars and phantomjs from HTML template.
Part of the Konfetti project: https://github.com/rootzoll/konfetti-app
nodesJS >0.12 - to install latest NodeJS on Ubuntu see: https://askubuntu.com/questions/49390/how-do-i-install-the-latest-version-of-node-js
npm install node src/index.js
There are two modes to call the service with HTTP GET when running:
Use parameter named 'codes' with a comma separated list of code strings as value. This will work with a template that has just one field named '{{code}}'. Use this mode to generate a big batch of code coupons etc.
For more detailed content replacement use a parameter called 'items'. As value give a JSON array containing objects. Every value of an object property will get replaced within the template with the '{{property-name}}'.
Example:
[{"name": "Christian","konfetti": "100"},{"name": "Björn","konfetti": "999"}]