Skip to content

A wkhtmltopdf alternative with modern CSS.

Flexbox, grid and web fonts that render the way your browser shows them, without an unmaintained binary on your servers.

With wkhtmltopdfA binary on your server
wkhtmltopdf --page-size A4 \
  --margin-top 18mm --margin-bottom 18mm \
  invoice.html invoice.pdf

# Then: template the HTML yourself, store the PDF,
# and email it with another service.
With TemplaterOne request, email and PDF
await fetch("https://templater.nestutils.com/v1/emails/send", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.TEMPLATER_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    template: "invoice-email",
    to: [invoice.customer_email],
    data: invoice,
    attachments: [{ template: "gst-invoice" }],
  }),
});

What changes when you switch.

ConcernwkhtmltopdfTemplater
Rendering engineAn old WebKit forkCurrent Chrome
Flexbox, grid and modern CSSPartial or missingSupported
MaintenanceRepository archived in 2023Maintained service
Template engineBring your ownHandlebars with helpers
Sending the emailSecond serviceSame request

When wkhtmltopdf is still the right call

If your layouts are simple, already work, and must run on a machine with no network access, a local binary you already know can be enough.

When Templater fits better

If your CSS uses flexbox or grid, or you want previews, versions and the email in one place, a current engine behind one API saves the workarounds.

Other comparisons

Product names are trademarks of their respective owners.