All templates

Modern invoice template

A4 portrait

An A4 invoice with a brand mark, an itemized line-item table, a highlighted amount-due panel, and a payment-details block. Send your invoice data to the API and the finished PDF comes back.

Preview of the Modern invoice template rendered as a PDF

The exact PDF the API produces. What you preview is what you generate.

Generate with the API

Use this template, publish it to get a template id, then call the API with your data. Replace YOUR_TEMPLATE_ID and YOUR_API_KEY with your own.

import { writeFile } from "node:fs/promises";
import { PdfGlyph } from "pdfglyph";

const client = new PdfGlyph({
  apiKey: "YOUR_API_KEY",
  baseUrl: "https://api.pdfglyph.dev",
});

const { pdf } = await client.generate({
  templateId: "YOUR_TEMPLATE_ID",
  data: {
    "invoiceNumber": "INV-2026-0042",
    "issueDate": "June 5, 2026",
    "dueDate": "June 19, 2026",
    "company": {
      "name": "Northwind Studio",
      "addressLine1": "128 Maple Avenue, Suite 5",
      "addressLine2": "Portland, OR 97204",
      "email": "billing@northwind.studio"
    },
    "billTo": {
      "name": "Acme Corporation",
      "addressLine1": "500 Industrial Parkway",
      "addressLine2": "Austin, TX 78701"
    },
    "items": [
      {
        "description": "Brand identity system",
        "quantity": "1",
        "rate": "$3,200.00",
        "amount": "$3,200.00"
      },
      {
        "description": "Marketing site design",
        "quantity": "1",
        "rate": "$1,800.00",
        "amount": "$1,800.00"
      },
      {
        "description": "Design retainer (hours)",
        "quantity": "8",
        "rate": "$50.00",
        "amount": "$400.00"
      }
    ],
    "subtotal": "$5,400.00",
    "taxLabel": "Tax (8.5%)",
    "taxAmount": "$459.00",
    "total": "$5,859.00",
    "payment": {
      "bankName": "First Cascade Bank",
      "accountNumber": "0041 2298 7745",
      "swift": "FCSBUS6P"
    },
    "notes": "Payment due within 14 days. Late payments are subject to a 1.5% monthly service charge."
  },
});

// pdf is a Uint8Array — write it to a file, return it, or stream it.
await writeFile("document.pdf", pdf);

Sample data

The JSON this preview was rendered from. Match these fields, or edit the template to fit the data you already have.

{
  "invoiceNumber": "INV-2026-0042",
  "issueDate": "June 5, 2026",
  "dueDate": "June 19, 2026",
  "company": {
    "name": "Northwind Studio",
    "addressLine1": "128 Maple Avenue, Suite 5",
    "addressLine2": "Portland, OR 97204",
    "email": "billing@northwind.studio"
  },
  "billTo": {
    "name": "Acme Corporation",
    "addressLine1": "500 Industrial Parkway",
    "addressLine2": "Austin, TX 78701"
  },
  "items": [
    {
      "description": "Brand identity system",
      "quantity": "1",
      "rate": "$3,200.00",
      "amount": "$3,200.00"
    },
    {
      "description": "Marketing site design",
      "quantity": "1",
      "rate": "$1,800.00",
      "amount": "$1,800.00"
    },
    {
      "description": "Design retainer (hours)",
      "quantity": "8",
      "rate": "$50.00",
      "amount": "$400.00"
    }
  ],
  "subtotal": "$5,400.00",
  "taxLabel": "Tax (8.5%)",
  "taxAmount": "$459.00",
  "total": "$5,859.00",
  "payment": {
    "bankName": "First Cascade Bank",
    "accountNumber": "0041 2298 7745",
    "swift": "FCSBUS6P"
  },
  "notes": "Payment due within 14 days. Late payments are subject to a 1.5% monthly service charge."
}

Start from the Modern invoice template

Open it in the editor as a new draft, adjust the HTML until it looks like yours, then generate PDFs from your code.