Minimal Receipt
Stripped-down receipt with a single-column layout, compact item list, totals block and a short customer/tender summary. Emphasis on whitespace.

DSL source
The whole template. Learn the language in the template DSL guide.
const cols = [
["SKU", "auto"],
["Item", "1fr"],
["Qty", "auto", "right"],
["Price", "auto", "right"],
["Total", "auto", "right"],
];
const template = doc(
{
size: "A4",
title: "Receipt {{receiptNumber}}",
padding: [30, 40, 30, 40],
styles: {
".store-name": { "font-size": 18, "font-weight": "bold", align: "center" },
".store-meta": { "font-size": 9, color: "#666", align: "center", "line-height": 1.35 },
".receipt-title": { "font-size": 10, color: "#666", align: "center", "letter-spacing": 2 },
".sec-label": { "font-size": 8, color: "#999", "font-weight": "bold" },
".hairline": { "border-color": "#ddd" },
".barcode": { "font-family": "Cousine", "font-size": 16, align: "center", "letter-spacing": 2 },
".barcode-num": { "font-family": "Cousine", "font-size": 9, align: "center", color: "#666" },
".footer-msg": { "font-size": 10, "font-style": "italic", align: "center", color: "#444" },
},
},
// Store header
r({ align: "center" }, s(".store-name", "{{store.name}}")),
gap(2),
r({ align: "center" }, s(".store-meta", "{{store.branch}}")),
r({ align: "center" }, s(".store-meta", "{{store.address}}")),
r({ align: "center" }, s(".store-meta", "{{store.phone}} • {{store.website}}")),
r({ align: "center" }, s(".store-meta", "Tax ID: {{store.taxId}}")),
gap(10),
hr(0, "#ddd"),
gap(6),
r({ align: "center" }, s(".receipt-title", "SALES RECEIPT")),
gap(6),
hr(0, "#ddd"),
gap(8),
// Transaction meta
r(
col("50%",
lv(s(".sec-label", "RECEIPT"), s(".body", "{{receiptNumber}}"), "40%"),
lv(s(".sec-label", "TXN"), s(".body", "{{transactionId}}"), "40%"),
lv(s(".sec-label", "DATE"), s(".body", "{{date}}"), "40%"),
lv(s(".sec-label", "TIME"), s(".body", "{{time}}"), "40%"),
),
col("50%",
lv(s(".sec-label", "CASHIER"), s(".body", "{{cashier}}"), "40%"),
lv(s(".sec-label", "REGISTER"), s(".body", "{{register}}"), "40%"),
lv(s(".sec-label", "MEMBER"), s(".body", "{{customer.name}}"), "40%"),
lv(s(".sec-label", "LOYALTY ID"), s(".body", "{{customer.loyaltyId}}"), "40%"),
),
),
gap(10),
hr(0, "#ddd"),
gap(4),
// Items table
table(cols, "item in items", [
[s({ "font-size": 9, "font-family": "Cousine", color: "#666" }, "{{item.sku}}"), "auto"],
[s(".body", "{{item.description}}"), "1fr"],
[s(".body", "{{item.qty}} {{item.unit}}"), "auto", "right"],
[s(".body", "${{item.unitPrice}}"), "auto", "right"],
[s(".body", "${{item.total}}"), "auto", "right"],
]),
gap(2),
hr(0, "#ddd"),
gap(4),
// Totals
r(
col("55%",
s({ "font-size": 9, color: "#666" }, "Items sold: {{itemCount}}"),
),
col("45%",
lv(s(".body", "Subtotal"), s(".body", "${{subtotal}}"), "60%"),
lv(s({ "font-size": 10, color: "#2a7a3a" }, "{{discountLabel}}"), s({ "font-size": 10, color: "#2a7a3a" }, "−${{discountAmount}}"), "60%"),
lv(s({ "font-size": 9, color: "#666" }, "Taxable"), s({ "font-size": 9, color: "#666" }, "${{taxableAmount}}"), "60%"),
lv(s(".body", "{{taxLabel}}"), s(".body", "${{taxAmount}}"), "60%"),
),
),
gap(4),
hr(0, "#333"),
gap(4),
r(
col("55%", s("")),
col("45%",
lv(
s({ "font-size": 12, "font-weight": "bold" }, "TOTAL"),
s({ "font-size": 12, "font-weight": "bold" }, "${{total}}"),
"60%",
),
),
),
gap(4),
hr(0, "#333"),
gap(10),
// Tender
r(s(".sec-label", "PAYMENT")),
gap(4),
r(
col("50%",
lv(s(".body", "Method"), s(".body", "{{tender.method}}"), "45%"),
lv(s(".body", "Card"), s(".body", "•••• {{tender.cardLast4}}"), "45%"),
lv(s(".body", "Auth"), s({ "font-family": "Cousine", "font-size": 10 }, "{{tender.authCode}}"), "45%"),
),
col("50%",
lv(s(".body", "Tendered"), s(".body", "${{tender.amountTendered}}"), "55%"),
lv(s(".body", "Change"), s(".body", "${{tender.change}}"), "55%"),
),
),
gap(10),
hr(0, "#ddd"),
gap(8),
// Loyalty
r(s(".sec-label", "LOYALTY REWARDS")),
gap(4),
r(
col("33%", lv(s({ "font-size": 9, color: "#666" }, "Member since"), s(".body", "{{customer.memberSince}}"), "55%")),
col("33%", lv(s({ "font-size": 9, color: "#666" }, "Points earned"), s(".body", "+{{customer.pointsEarned}}"), "55%")),
col("34%", lv(s({ "font-size": 9, color: "#666" }, "Balance"), s(".body", "{{customer.pointsBalance}}"), "45%")),
),
gap(12),
hr(0, "#ddd"),
gap(10),
// Barcode
r({ align: "center" }, s(".barcode", "||||| ||| |||| | ||| ||||| || |||| |||||")),
gap(2),
r({ align: "center" }, s(".barcode-num", "{{barcode}}")),
gap(12),
// Return policy + footer message
r({ align: "center" }, s({ "font-size": 8, color: "#888", align: "center" }, "{{returnPolicy}}")),
gap(8),
r({ align: "center" }, s(".footer-msg", "{{footerMessage}}")),
ftrPages("{{store.name}}"),
);
const sampleData = {
receiptNumber: "R-2026-004188",
transactionId: "TXN-880423117",
date: "18 April 2026",
time: "14:32:07",
store: {
name: "Greenfield Market",
branch: "Store #042 — Capitol Hill",
address: "1820 Broadway Ave E, Seattle, WA 98122",
phone: "(206) 555-0182",
website: "greenfieldmarket.example.com",
taxId: "WA-UBI 602-341-887",
},
cashier: "Avery M.",
register: "POS-03",
customer: {
name: "Jordan Rivera",
loyaltyId: "GM-7788-2241",
memberSince: "14 August 2022",
pointsEarned: 58,
pointsBalance: "2,416.00",
},
items: [
{ sku: "4011", description: "Bananas, organic (per lb)", qty: 2.14, unit: "lb", unitPrice: "0.89", total: "1.90" },
{ sku: "094118", description: "Sourdough boule — bakery", qty: 1, unit: "ea", unitPrice: "6.50", total: "6.50" },
{ sku: "041800", description: "Free-range eggs (dozen)", qty: 2, unit: "ea", unitPrice: "7.25", total: "14.50" },
{ sku: "871223", description: "Cold-brew coffee, 32 oz", qty: 1, unit: "ea", unitPrice: "9.99", total: "9.99" },
{ sku: "204501", description: "Whole milk, 1 gal", qty: 1, unit: "ea", unitPrice: "5.79", total: "5.79" },
{ sku: "667210", description: "Greek yogurt, vanilla (6-pack)", qty: 1, unit: "ea", unitPrice: "8.49", total: "8.49" },
{ sku: "330118", description: "Avocados, hass (bag of 4)", qty: 1, unit: "ea", unitPrice: "6.99", total: "6.99" },
{ sku: "552019", description: "Dark chocolate, 70% (bar)", qty: 3, unit: "ea", unitPrice: "3.75", total: "11.25" },
],
itemCount: 12,
subtotal: "65.41",
discountLabel: "Member savings",
discountAmount: "3.27",
taxableAmount: "62.14",
taxRate: 0.101,
taxLabel: "WA Sales Tax (10.1%)",
taxAmount: "6.28",
total: "68.42",
tender: {
method: "Visa Credit",
cardLast4: "4821",
authCode: "118-73A",
amountTendered: "68.42",
change: 0,
},
barcode: "0046007700488412007",
returnPolicy: "Returns accepted within 30 days with receipt. Perishables final sale.",
footerMessage: "Thank you for shopping at Greenfield Market — see you again soon!",
};Sample data
{
"receiptNumber": "R-2026-004188",
"transactionId": "TXN-880423117",
"date": "18 April 2026",
"time": "14:32:07",
"store": {
"name": "Greenfield Market",
"branch": "Store #042 — Capitol Hill",
"address": "1820 Broadway Ave E, Seattle, WA 98122",
"phone": "(206) 555-0182",
"website": "greenfieldmarket.example.com",
"taxId": "WA-UBI 602-341-887"
},
"cashier": "Avery M.",
"register": "POS-03",
"customer": {
"name": "Jordan Rivera",
"loyaltyId": "GM-7788-2241",
"memberSince": "14 August 2022",
"pointsEarned": 58,
"pointsBalance": "2,416.00"
},
"items": [
{
"sku": "4011",
"description": "Bananas, organic (per lb)",
"qty": 2.14,
"unit": "lb",
"unitPrice": "0.89",
"total": "1.90"
},
{
"sku": "094118",
"description": "Sourdough boule — bakery",
"qty": 1,
"unit": "ea",
"unitPrice": "6.50",
"total": "6.50"
},
{
"sku": "041800",
"description": "Free-range eggs (dozen)",
"qty": 2,
"unit": "ea",
"unitPrice": "7.25",
"total": "14.50"
},
{
"sku": "871223",
"description": "Cold-brew coffee, 32 oz",
"qty": 1,
"unit": "ea",
"unitPrice": "9.99",
"total": "9.99"
},
{
"sku": "204501",
"description": "Whole milk, 1 gal",
"qty": 1,
"unit": "ea",
"unitPrice": "5.79",
"total": "5.79"
},
{
"sku": "667210",
"description": "Greek yogurt, vanilla (6-pack)",
"qty": 1,
"unit": "ea",
"unitPrice": "8.49",
"total": "8.49"
},
{
"sku": "330118",
"description": "Avocados, hass (bag of 4)",
"qty": 1,
"unit": "ea",
"unitPrice": "6.99",
"total": "6.99"
},
{
"sku": "552019",
"description": "Dark chocolate, 70% (bar)",
"qty": 3,
"unit": "ea",
"unitPrice": "3.75",
"total": "11.25"
}
],
"itemCount": 12,
"subtotal": "65.41",
"discountLabel": "Member savings",
"discountAmount": "3.27",
"taxableAmount": "62.14",
"taxRate": 0.101,
"taxLabel": "WA Sales Tax (10.1%)",
"taxAmount": "6.28",
"total": "68.42",
"tender": {
"method": "Visa Credit",
"cardLast4": "4821",
"authCode": "118-73A",
"amountTendered": "68.42",
"change": 0
},
"barcode": "0046007700488412007",
"returnPolicy": "Returns accepted within 30 days with receipt. Perishables final sale.",
"footerMessage": "Thank you for shopping at Greenfield Market — see you again soon!"
}Render it with your data
Any API key can render this template by its ID. This call uses the sample data; add a data object to use your own. See the API reference.
curl -X POST https://makespdf.com/api/v1/render \
-H "Authorization: Bearer $MAKESPDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"templateId": "receipt-minimal"}' \
-o output.pdf