First off, I didn't plan to build another PDF generation library. I completely assumed that the existing tools in the ecosystem were already good enough.

Boy, was I surprised.

At work, I was handed what I assumed would be a simple task: building a transaction receipt layout. The rendering had to happen entirely on the backend, because the generated PDFs needed to be consistently consumed across our mobile app, web app, and admin dashboard. Building it in one centralized place made perfect architectural sense.

I started the task completely unaware of the massive infrastructure and developer experience frustration I was heading into. This is how my rabbit hole journey started:

Phase 1: The Imperative JSON Nightmare (pdfmake)