Blog Layout

I Hunted PDF Generator API on Product Hunt

Bill Doerrfeld | June 4, 2020
PDF Generator API is now live on Product Hunt! PDF Generator API is a flexible Web API and template editor for PDF generation. Using PDF Generator API, you can easily embed transactional PDF document creation into your application. It's got a drag-and-drop editor that taps into end-user data to make PDFs.

I admire APIs that do one thing and do it really well, and PDF Generator API epitomizes that idea. It's a business processing utility executed well by a solid team with years of experience focusing on a single idea: automating the PDF documentation generation process.
Give PDF Generator API an upvote on Product Hunt

Review of PDF Generator API

What's The Use Case?
Many document-heavy business applications, like an eCommerce shop, accounting firm, or an ERP platform, need to generate PDFs for things like invoices, packing slips, contracts, and labels. The issue is that manual PDF creation is pretty tedious. So, a lot of these scenarios will create reusable templates. PDF Generator API is automating this process, helping avoid development duplication, and aiding in custom template creation.

Designing Templates
PDF Generator API offers an embeddable drag-and-drop editor so that end-users can design their own custom templates. Users choose how their data will be shown, within Text, Tables, Containers, and other fields, or you can generate standard Images and Footers to include in all your PDFs. Once you create a template, you merge them with your data by using the REST API to generate PDFs. You can upload a JSON file to try out using the editor without an integration. 
Quality Developer Experience (DX) ✔️
When it comes to DX, PDF Generator API is following all the best practices. Onboarding is straightforward; simply sign up to instantly obtain an API key. Powered by Redoc, PDF Generator API boasts beautiful 3-columned API documentation that is really easy to navigate. Docs are auto-generated from a OpenAPI v3.0 spec. That's awesome, since using OpenAPI provides other abilities; they've added a Run in Postman button so you can test out API calls lickety-split. It's a RESTful API, so it's pretty easy to follow. 
Developer Resources
PDF Generator API excels at appeasing many use cases. Docs come handy with copy and pastable code samples in PHP, Python, Java, Ruby, and other languages & frameworks. You can also view JSON responses and error messages for any function. 

Accounts & Pricing
PDF Generator API offers a pretty generous free account, allowing up to 500 merges per month. Beyond that, you can check out their pricing plans.
Product Hunt perks
Sample Invoice Creation Using PDF Generator API: eCommerce SaaS
To see how PDF Generator API works in action, let's consider how a business would use it to streamline PDF creation. Say our company is a document-heavy business, like an eCommerce SaaS. The eCommerce SaaS enables users to send invoices to end customers on a monthly basis. 

Our users require custom designs for PDF invoices to match their storefront branding and to display up-to-date information. However, fulfilling their needs through development cycle is expensive. The eCommerce SaaS wants to avoid extra costs from developers and support so that the customer themselves can build their templates.

The goal is to create a reusable, automated process to generate PDFs on a large scale, while allowing for customization. First, we design a PDF template using drag-and-drop widgets. These include text fields, columns, images, QR codes, and more. We can customize color and fonts to match our company brand. You can view an active demo template here.

Next, we insert data fields by choosing which property to display and where. For example, one text box uses the {invoice_date} field to display the date. {invoice_number} is used to insert the invoice number. Multiple fields can be inserted in the same text box. Such as the following company information:

{company}
{address1}
{city} 

You can even write in expressions to accumulate sums. In this case, the expression ${% sum({line_items::total_cost}) %} calculates the total cost of good and services. Once the template is finished, to create a PDF we must merge the template with an API request that sends JSON formatted with the identical field names. We make an API request to the base URL endpoint https://us1.pdfgeneratorapi.com/api/v3 with our API key. 

To demonstrate, here is some sample JSON which would be sent with the API request:

{ "invoice_number": "4698018857", "phone_number": "(978) 555-7555", "email_id": "johnmiller@pdfgeneratorapi.com", "name": "John Miller", "logo": "https://www.onlinelogomaker.com/images/tutorialnew/tutorial.jpg", "customer_memo": "Thank you for your business and have a great day!", "period": "July period", "invoice_date": "2019-08-03", "address1": "2 Maple St", "phone": null, "city": "New Milford", "zip": "18834-2014", "province": "Pennsylvania", "country": "United States", "last_name": "LeBron", "address2": null, "company": "ACME Company Inc", "credit": { "balance": 0.0 }, "line_items": [ { "total_cost": 182, "hours": 7, "fee": 12, "description": "DB Architecture", "note": "Database architecture focuses on the design, development and implementation." }, { "total_cost": 189, "hours": 9, "fee": 29, "description": "Analysis", "note": "Detailed examination of anything complex in order to understand its nature or to determine its essential features" }, { "total_cost": 175, "hours": 5, "fee": 15, "description": "Web scrapping", "note": "Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites" }, { "total_cost": 160, "hours": 8, "fee": 10, "description": "Web design", "note": "Responsible for creating the design and layout of a website or web pages" } ] }

On the client-side, you could export a PDF from the editor. Though, since it's API-driven, the exact process is super flexible. You could create a form to input this data, or hook into your CRM systems. The end result is a slick PDF to send to our client! PDF Generator API can also generate an HTML version to reduce file size and bloat. You can view a sample HTML version here
How genAI can aid Kubernetes troubleshooting
By Bill Doerrfeld December 23, 2024
I caught up with CTO Itiel Shwartz about leveraging finely tuned models like Komodor’s KlaudiaAI agent for ultra-specific DevOps challenges, like Kubernetes error diagnosis and remediation challenges.
Framing AI in the right light
By Bill Doerrfeld December 20, 2024
Rolling out AI is all about framing it in a positive light, says GitLab's CTO, Sabrina Farmer. I interviewed her for the latest edition of DirectorPlus for LeadDev, which is out today.
What's on the top of CIOs' minds lately? Resilience.
By Bill Doerrfeld December 19, 2024
Surmounting risks are encouraging CIOs to future-proof and update their resilience strategies. My latest feature for CIO.com explores resilience head-on.
DX Core 4 unifies developer productivity frameworks
By Bill Doerrfeld December 10, 2024
Today, DX debuted a new developer productivity framework, DX Core 4. Excited to break the news with LeadDev, interviewing one of the designers of the framework.
Migrating to microservices at MACH-speed
By Bill Doerrfeld December 2, 2024
In this issue of DirectorPlus, Gus Fune shares the story behind reverse engineering a monolithic e-commerce platform following MACH principles, which stands for microservices, APIs, cloud-native, and headless.
How spec-first API documentation aids partner integration
By Bill Doerrfeld November 29, 2024
Having good API documentation is one thing. Being specification-first is next level. Here are the benefits a specification-driven, git-based approach to documentation can bring to partner API integrations.
Understanding the root causes of api drift
By Bill Doerrfeld November 20, 2024
75% of APIs stray from their OpenAPI specifications. My feature explores why API drift is so common and how engineering leaders should mitigate this issue.
Takeaways from KubeCon 2024 Doerrfeld
By Bill Doerrfeld November 19, 2024
At the latest KubeCon, Kubernetes maturity, AI workloads, platform engineering, open-source funding, and WebAssembly were recurring themes.
Can Wasm replace containers
By Bill Doerrfeld November 11, 2024
My latest feature for InfoWorld explores where WebAssembly (Wasm) shines and where containers can't be beaten, featuring perspectives from a cast of industry experts.
A walk through API economy trends in 2024
By Bill Doerrfeld November 7, 2024
My keynote from Platform Summit 2024 walks through API economy trends like AI, description languages, spec drift, unbundling, developer experience, governance, and more.
More Posts
Share by: