Aavverajovanovic.i
Back to home
Case Study

PDF Generation
Pipeline

Getting a PDF out of an app went from a five-step manual chore to one button, with every PDF identical and the running cost flat. This build was for invoices, and the same pipeline works for any PDF an app produces.

role
Design & Development
stack
Knack, Vercel, Make.com
delivery
In-app preview + automated Outlook email
01 / 07
the_problem

The Problem

Generating PDFs by printing browser pages is inconsistent, slow, and impossible to automate. Knack has no native way to turn a record into a PDF, so for this customer portal that was how every invoice went out.

The print scale and the browser's headers and footers needed fixing on every print, the output varied with whoever printed it, and a scheduled send was out of the question.

before
  1. 01print page
  2. 02fix scale
  3. 03strip headers
  4. 04download
  5. 05write email
  6. 06attach
  7. 07send
after
one button
02 / 07
one_renderer

One button, one source

Now the whole chain is one button. Staff preview or download the invoice inside the app, and customer emails go out on demand or on a schedule with the PDF already attached. Every copy comes from the same source, so they cannot drift apart.

Staff
preview and download in the app
Customers
invoice emails, on demand or scheduled
One PDF service
every PDF is identical

The invoice design was rebuilt once as a small online service. Anything that needs an invoice asks that service and gets the same finished PDF back.

[examples/invoice-pdf-pipeline-full.png]image
// The rendered invoice. Fictional brand and demo data.
03 / 07
in_the_app

In the app

Invoice pages carry two buttons: Preview Invoice PDF and Download Invoice PDF. Preview opens the finished PDF in a large window. Download saves exactly what was previewed, with the same filename the emailed copy uses.

04 / 07
automated_delivery

Automated delivery

Customer emails go out through Outlook with the invoice attached. This client already ran Make.com, so it handles the send. Knack's own Flows can do the same job with no extra subscription.

An email only goes out when the PDF rendered correctly, so a failure can never mail a broken attachment. The emails stay small enough that Gmail shows them in full instead of clipping them, and each one links back to the invoice in the portal.

05 / 07
security

Built to be secure

Invoices are financial documents, so the service treats every request as untrusted. Only logged-in staff and the email automation can request a PDF, and staff access follows the same role permissions as the rest of the app.

The service accepts nothing except a single invoice reference, rate-limits abusive traffic, and gives attackers no clues in its error responses.

06 / 07
the_cost

What it costs

Data-to-PDF services price per document, and the tiers climb with volume. This pipeline's only recurring cost is a flat $20 a month of hosting. An invoice takes about a third of a second of compute, so even 100,000 invoices a month adds roughly $3.

At 10,000 invoices a month, published alternatives run $89 to $699 (July 2026 list prices), and $499 is the only published tier at 100,000. The flat plan sits 78-96% below those, roughly $830 to $5,700 a year. The design is custom code, so the layout is not limited by a template editor, and six-figure monthly volume stays inside the flat plan.

If you already run a server, the hosting bill disappears too: the service is one small process that can sit on your existing infrastructure, so the ongoing cost is zero.

The numbers above are ongoing costs. Building the pipeline is a one-time setup cost. After that, this is all it takes to run.

07 / 07
outcome

Outcome

The invoice a customer receives and the one staff pull up come from the same source, so they cannot drift apart. There is no per-document service behind it, and no data goes to an outside PDF vendor.

Nothing in the pipeline is invoice-specific. Quotes, statements, contracts, reports, certificates: any PDF an app needs to produce consistently can run through the same setup.

Next step

Need PDF generation like this for your own Knack app?