A visual PHP PDF builder: design on a drag-and-drop canvas, then export clean, ready-to-run PHP that turns your document from HTML to PDF. getpdfcode handles the nested tables and per-library quirks — you never touch them.
One visual PDF builder for html2pdf, Dompdf and mPDF. Design once, export clean PHP for any of the three, and switch engines without rebuilding.
Design it visually, export spipu/html2pdf PHP. Draws codes itself and has the strongest encryption. The slowest, and the fragile one when tables nest deep.
Design it visually, export Dompdf PHP. The most predictable box model of the three, and the steadiest when tables nest deep.
Design it visually, export mPDF PHP. The broadest CSS and the best Unicode, and the fastest on a long document.
From blank canvas to production-ready PHP in minutes — not days of wrestling with library quirks.
Draw it once, mark the parts that change, and leave with the PHP that generates it.
Drag rows, tables, text and images onto a real page and style them in the panel beside it. Start from a finished template if you would rather not begin with a blank one.
The canvas is the same size as the paper — nothing shifts later.
Turn the parts that differ per document — a name, a total, a table of line items — into variables. Add a rule to hide a section, or repeat a row once per item.
One template then covers every invoice, not one of them.
Download a small Composer project — a template file, a runner, your fonts and images. Pass in your data, call it from your own app, and it writes the PDF.
Yours to keep: no API to call, no account needed to run it.
Start free. Upgrade when you need the full toolkit.
Whether a visual builder can do the job, and how the three PHP PDF libraries compare.
Yes. getpdfcode is a drag-and-drop PDF builder that exports ready-to-run Dompdf code: design the document on a canvas, preview it rendered by Dompdf itself, and download a Composer project that uses dompdf/dompdf. Where Dompdf has no native QR codes or barcodes, they arrive as vector SVG, so they stay sharp and scan.
Yes. Lay the page out visually and export PHP for mpdf/mpdf. mPDF is the strongest of the three for Arabic, Hebrew and Indic scripts and draws its own barcodes; where it cannot round a table cell's corners, the export bakes the rounded box into the background for you.
Yes, for the PHP library spipu/html2pdf, which is built on TCPDF (not the JavaScript html2pdf.js). The export works around TCPDF's weak spots: nested columns are given point widths so they do not drift, and background images are scaled to the row first, because TCPDF has no background-size.
mPDF supports more HTML and CSS, handles right-to-left and Indic scripts far better, and was the fastest of the three on a long document. Dompdf has the most predictable layout, signs PDFs natively, and keeps its fonts inline in the exported template, which makes the project the simplest of the three to move to another server. For invoices and reports either works well.
html2pdf draws QR codes, barcodes, PDF417 and DataMatrix itself and has the strongest encryption, AES-256. Dompdf was almost three times faster on the same 40-page document (14 seconds against 40), stays steadier when tables nest deep, and understands modern colour syntax, which TCPDF drops.
mPDF was the fastest of the three on a 40-page document, about 10 seconds against html2pdf's 40, and has the broadest CSS. html2pdf is the only one that resolves percentage heights by itself, and the only one with AES-256 encryption and native PDF417 and DataMatrix codes.
Yes. One design exports to any of the three, so changing library means exporting again, not rebuilding the document. The live preview renders with the engine you choose, so you can see the differences before you switch.
Yes. You download an ordinary Composer project: a template file, a runner, and your fonts and images. Call it from Laravel, Symfony or plain PHP and it writes the PDF. Nothing in it depends on getpdfcode.