HTML + JSON → PDF

Build an invoice PDF workflow

Start with the data your application already owns. These guides show how to turn subscription charges or ecommerce orders into PDF documents using a reusable HTML template and the Templatr REST API.

Choose your source of data

What your integration needs

  1. Finalized data. Calculate tax, discounts, totals and invoice numbers in your billing or commerce system. Format currency and dates before rendering.
  2. A print layout. Use HTML, CSS and JSON variables. Test long names, empty values, multiple rows and page breaks in the generated PDF.
  3. A server-side API call. Keep your API key on your server, verify the response status and associate the document with your source invoice.

Templatr renders documents. Your application controls payment collection, tax calculations, required invoice fields and retention. The examples use fictional data and do not provide certified e-invoicing or legal validation.