Dynamic PDF generation made simple

karanche97

Karan

Posted on September 20, 2023

Dynamic PDF generation made simple

One major challenge every developer faces is generating reports and sending it as emails, coping up with the client's everchanging requirements over the templates, and data configuration.

The traditional way of doing it, is by creating a HTML Pug template for the requested PDF and place template placeholders and pass the real-time data as dynamic variables. Most probably we'll end up using Puppeteer or PDFKit. Customizing these templates as the requirement changes is a tedious and repetitive work.

To tackle these issues, why not ask the business people to design their PDF templates and customize it as per their requirements. As a developer our focus is to prepare data for the reports and call a service that will take care of the PDF Generation. We created an service that does exactly this.

How exaclty?

PDFHippo a tool that let you business people design their report just using an Excel and map the cells that's going to render dynamic data using the syntax var:customer_name and define the cell ranges.

To render array of data like invoice table we can use the formula

table syntax

Upload the excel and save it as a template in PDFHippo and it will give you and unique api end point for the template.

Prepare the JSON data using your favorite programming language and call the template api. Save the blob and boom... Now you can share it with your clients, send it an email or save it in your bucket.
Best part: None of your data is getting saved in PDFHippo.

Documentation: https://pdf-hippo.readme.io/reference/getting-started-with-your-api

Give it a try and let me know what we can do to build up on this!

💖 💪 🙅 🚩
karanche97
Karan

Posted on September 20, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Dynamic PDF generation made simple
pdf Dynamic PDF generation made simple

September 20, 2023