Purchase order template, HTML and Handlebars
A purchase order with the vendor, payment terms, delivery date and every line item.
Free to copy. Send it from your app with POST /v1/pdfs/render and the slug purchase-order.
Template source
<div class="page">
<div class="head">
<div><h1>PURCHASE ORDER</h1><p class="muted">{{po.number}} · {{formatDate po.date "DD MMM YYYY"}}</p></div>
<div style="text-align:right"><strong>{{company.name}}</strong><br><span class="muted">{{company.city}}</span></div>
</div>
<p>Vendor <strong>{{vendor.name}}</strong> · Terms {{po.terms}} · Deliver by {{formatDate po.deliver_by "DD MMM YYYY"}}</p>
<table class="items">
<thead><tr><th>Item</th><th class="num">Qty</th><th class="num">Rate</th><th class="num">Amount</th></tr></thead>
<tbody>
{{#each lines}}
<tr><td>{{name}}</td><td class="num">{{qty}}</td><td class="num">{{formatCurrency rate "INR"}}</td><td class="num">{{formatCurrency amount "INR"}}</td></tr>
{{/each}}
</tbody>
</table>
<p class="total">Total {{formatCurrency po.total "INR"}}</p>
</div>
<style>
@page { size: A4; margin: 18mm; }
body { font-family: Arial, Helvetica, sans-serif; color: #17181c; font-size: 12px; }
h1 { font-size: 22px; letter-spacing: 2px; margin: 0; }
.muted { color: #5a5c63; }
.head { display: flex; justify-content: space-between; margin-bottom: 24px; }
table.items { width: 100%; border-collapse: collapse; margin-top: 16px; }
table.items th { text-align: left; font-weight: normal; color: #5a5c63; border-bottom: 1.5px solid #17181c; padding: 6px 0; }
table.items td { padding: 8px 0; border-bottom: 1px solid #ece9e2; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.total { margin-top: 12px; text-align: right; font-size: 15px; font-weight: bold; }
</style>Sample data (JSON)
{
"company": {
"name": "Kestrel Foods Pvt Ltd",
"city": "Bengaluru, Karnataka",
"gstin": "29ABCDE1234F1Z5"
},
"vendor": {
"name": "Harvest Mills"
},
"po": {
"number": "BLR-2026-0421",
"date": "2026-09-28",
"terms": "Net 30",
"deliver_by": "2026-10-10",
"total": 184000
},
"lines": [
{
"name": "Wheat Flour 25 kg",
"qty": 200,
"rate": 620,
"amount": 124000
},
{
"name": "Semolina 25 kg",
"qty": 100,
"rate": 600,
"amount": 60000
}
]
}What does the purchase order template include?
- Format
- A PDF document, rendered in headless Chrome with print CSS
- Data it needs
companyvendorpolines- Repeats for
lines- Helpers used
formatCurrencyformatDate
How do I use the purchase order template?
- 01Open it with sample dataOpen the purchase order template in the free HTML to PDF converter. It loads with sample data, so the preview shows the finished document.
- 02Swap in your own dataReplace the sample JSON with a real record from your system (company, vendor, po and the rest) and check the preview.
- 03Save it and call the APISave it to a free workspace, publish it, then call POST /v1/pdfs/render with the slug purchase-order and your JSON.
Purchase order template questions
Is the purchase order template free?
Yes. Copy the HTML and the sample data from this page, or edit it in the free HTML to PDF converter without an account.
Can I use this template without Templater?
Yes. It is plain HTML with Handlebars placeholders, so any Handlebars renderer can fill it in. Turning it into a PDF yourself needs a headless browser; Templater does that in one API call.
How do I generate this PDF from my backend?
Save the template in a workspace and call POST /v1/pdfs/render with "template": "purchase-order" and your data. The response is the PDF.