About getpdfcode
getpdfcode is a visual PDF builder for the PHP community — built by one developer who got tired of fighting PDF libraries by hand.
The problem I kept hitting
When you generate PDFs in PHP with html2pdf (TCPDF), Dompdf or mPDF, the hard part isn't writing code — it's that these libraries don't render HTML the way a browser does. A normal <table> with plain <tr> and <td> often won't lay out the way you expect.
To get columns to line up you end up nesting tables inside tables. Percentage widths, vertical alignment, side margins, rounded corners and a lot of everyday CSS quietly don't work — each library in its own way. So you burn hours on trial-and-error renders just to get a simple layout right.
The solution
getpdfcode lets you design your document visually and deals with the quirks for you. It works out the nested-table structure, the spacing workarounds and the differences between each library — then exports clean PHP that actually renders correctly in the engine you chose. You spend your time on the document, not on reverse-engineering a rendering engine.
Built by one person
getpdfcode is an independent project — designed, built and maintained by a single developer, not a company or a team. That means it's shaped entirely around real developer problems, and when you reach out, you're talking to the person who actually writes the code.
— One developer, writing every line. More about the developer →
What I care about
- No lock-in. The code you export is plain PHP that's yours to keep, run and modify anywhere.
- Honesty about what works. Every library has limits — they're documented openly in the compatibility guide, not hidden.
- Fair pricing. A genuinely useful free plan, and one simple Pro tier when you need more.
Support the project
getpdfcode is paid for out of pocket. Servers, storage, the domain and the email that carries your password resets are billed every month whether anyone signs up or not, and rendering a PDF is genuinely expensive — a long document holds a fifth of a gigabyte of memory for up to forty seconds.
That is what keeps the free plan as generous as it is: unlimited exports, all three engines, real production code you owe nothing for. If this has saved you an afternoon and you would like it to still be here next year, there are a few ways to help — going Pro, chipping in once, or simply telling another PHP developer it exists.