Gennie is our text-to-pdf generator. Written in a few lines of Node.js, she is converting all required templates to pretty PDF documents.
Each Gennie instance serves a specific type of PDF layout, as located in the document
subfolder.
Just fire a POST request to /render
, where the body of your request containes the json required for the template.
Gennie will possibly hold you request for a while, depending on how busy she is.
Once she's ready, she will internally render the document and just return a valid PDF to you.
Gennie needs a document template in document
.
You can map this in with a Docker container, or simply place your content there.
Please ensure the main file should be called index.html
.
It can include all kinds of javascript or css, just link to it from index.html
.
At inventid @joostverdoorn decided that we needed a new platform. We used to depend on another system, but increasingly we found it triggered errors under higher loads, and it was coupled to strictly with our remaining applications. Instead of functioning as a separate service it still had to be deployed on each app server. This hurt our deploy speeds, made operations more difficult, and did solve only a few issues.
Gennie on the other hand is designed to run as the simplest service possible.
By conforming to the simplest possible REST specification, we are able to run html2pdf as a separate service.
Our documents are stored in a separate repository, which has a special prebuild
branch.
This branch also contains all required bower dependencies, which can therefore be pulled.
In case you have some great ideas, you may just open an issue. Be sure to check beforehand whether the same issue does not already exist.
We feel contributions from the community are extremely worthwhile. If you use Gennie in production and make some modification, please share it back to the community. You can simply fork the repository, commit your changes to your code and create a pull request back to this repository.
If there are any issues related to your changes, be sure to reference to those.
Additionally we use the develop
branch, so create a pull request to that branch and not to master
.
- joostverdoorn (Lead developer of Gennie @ inventid)