Sign inBlogSupportContact
Templates

Generate branded PDFs from WordPress without a PDF plugin

Invoices, receipts, shipping labels, certificates. Design once in the drag-and-drop builder, generate per order, per user, per event — dynamic tags filled at runtime.

5 min read May 2026 generate pdf

Generating PDFs from WordPress is always harder than it should be

You want branded invoices on your WooCommerce orders. You research the options. Every path ends badly: a premium PDF plugin with recurring fees, a free plugin with ugly default templates, or a custom DOMPDF integration you'd have to build and maintain yourself.

And that's just invoices. Next month you'll want shipping labels. Then event tickets. Then certificates for a membership site. Each one wants its own specialized plugin.

What most people do instead

Install WooCommerce PDF InvoicesGood at invoices, bad at everything else. Annual subscription. Templates locked behind a "premium" upgrade.
Build a DOMPDF integrationMonths of developer time. You own every bug. Template changes require code deploys.
Use a third-party PDF APIPer-generation pricing. Customer data leaves your stack. API downtime breaks your checkout.

A better way: design once, generate from any macro

Build your PDF template in the drag-and-drop Email Template Builder (PDF type). Add dynamic tags like {{customer_name}}, {{order_total}}, {{order_items}}. Then the generate pdf command creates a PDF from that template, with the dynamic tags filled from trigger data or upstream chain results.

Macro Builder
PDF generated
invoice-1247.pdf (84kb)
Template: Invoice Template v2
Tags filled: customer_name, order_total, order_items (x5), invoice_date
Result: {{step1.file_path}}, {{step1.file_url}}available to next step

Designed for macros. The generated PDF's path and URL are exposed as chain results (step1.file_path, step1.file_url). The next step can attach the PDF to an email, upload it to S3 via send-api, or save it to user meta.

How it works

The command takes a saved template (built in the PDF type of the Template Builder), fills dynamic tags from the current macro context, and renders via the bundled DOMPDF library. Generated PDFs save to the uploads directory with a time-stamped filename. The path + secure download URL flow to downstream steps.

1
Design a PDF template onceUse the drag-and-drop builder with PDF page size. Add {{dynamic_tags}} anywhere.
2
Add "generate pdf" as a macro stepPick the template. Tags auto-resolve from trigger data or upstream chain results.
3
Use the result downstreamAttach to an email, upload to S3, save to meta — step1.file_path is ready for the next step.
ParameterValue
-template_idID of a saved PDF template
Dynamic tag resolutionTrigger context + upstream chain results auto-fill tags at render time
Storageuploads/trc/pdfs/ with time-stamped filename
Returnsfile_path (filesystem), file_url (secure download link)
For-each supportYes — generate one PDF per item in an array (one per order, one per user)
Can be used in

Real example

You want every WooCommerce order to trigger an automated invoice PDF sent to the customer.

Template: you design a one-page invoice in the builder — logo, order number, date, customer info, line items, total. Every variable is a {{tag}}. Save as "Customer Invoice v1".

Macro: triggered by "woocommerce_order_paid". Step 1 is generate pdf with the invoice template. Step 2 is send template email with a "Your invoice is attached" email, and {{step1.file_path}} as the attachment.

Set it once. Every paid order generates a branded PDF invoice and emails it to the customer. You never touch it again.

Goes further with TrueCommander

Ready?

Automated invoices, receipts, and certificates.

This is one of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.