Most freelancers and small agencies pay $12–$20/month for cloud invoicing tools just to send 5–15 PDF invoices a month.

What many developers overlook is that modern Chromium/Safari/Firefox browsers already ship with a vector-sharp PDF print engine and persistent client storage—meaning you can build a complete, multi-currency invoice, quote, receipt, and tax CSV ledger app inside one single offline .html file under 25 KB, with zero backend, zero frameworks, and zero subscriptions.

Here are the 4 core patterns that make a single-file offline invoice app feel genuinely production-grade.

1. Zero-Glitch Vector PDF Export with @page and @media print

The #1 complaint with browser-printed invoices is clipped margins, missing background accents, or toolbar buttons showing up on page 2. Four lines of CSS eliminate all of those:

@page { size: A4; margin: 12mm; } @media print { * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } .toolbar, .sidebar, .no-print { display: none !important; } .invoice-paper { box-shadow: none !important; border: none !important; margin: 0 !important; width: 100% !important; } } 

When the user clicks Export PDF, calling window.print() produces a razor-sharp selectable-text vector PDF with exact brand colors and zero layout overflow.

2. Offline Logo & Payment QR Embedding via FileReader

Instead of uploading client logos or bank/PayPal/Crypto payment QR codes to an external bucket, convert any selected PNG/JPG directly into an inline Base64 Data URL and persist it in localStorage:

function bindImageUpload(inputId, imgId, storageKey) { const input = document.getElementById(inputId); const img = document.getElementById(imgId); const saved = localStorage.getItem(storageKey); if (saved) { img.src = saved; img.style.display = 'block'; } input.addEventListener('change', (e) => { const file = e.target.files?.[0]; if (!file) return; const reader = new FileReader(); reader.onload = () => { img.src = reader.result; img.style.display = 'block'; localStorage.setItem(storageKey, reader.result); }; reader.readAsDataURL(file); }); } 

Now every invoice automatically displays your crisp brand logo and scannable payment QR code—even on an airplane with Wi-Fi turned off.

3. Clean Line-Item Math (Deposits, Discounts, Tax/VAT & Multi-Currency)

Always round cleanly and let Intl.NumberFormat handle multi-currency display without floating-point glitches:

function formatMoney(amount, currency = 'USD') { return new Intl.NumberFormat('en-US', { style: 'currency', currency, maximumFractionDigits: currency === 'VND' || currency === 'JPY' ? 0 : 2, }).format(amount); } 

4. Built-In Accountant-Ready Tax CSV Export

Save every issued invoice snapshot into a localStorage array and export a clean UTF-8 BOM CSV file (so Excel opens international characters cleanly without garbling):

function exportTaxCsv(records) { const header = ['InvoiceNo', 'Date', 'Client', 'Currency', 'Subtotal', 'Tax', 'Total', 'Status']; const rows = records.map(r => header.map(k => `"${String(r[k] ?? '').replace(/"/g, '""')}"`).join(',')); const csv = '\uFEFF' + [header.join(','), ...rows].join('\n'); const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' }); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = `tax_ledger_${new Date().toISOString().slice(0, 10)}.csv`; a.click(); } 

Want the Finished Offline App Ready in 10 Seconds?

Feel free to copy any of the snippets above straight into your own workflow!

If this saved you an hour (or a $15/mo SaaS bill):

What other tiny single-file HTML tools have replaced paid SaaS in your workflow? Drop them in the comments!