DEV Community

devbox-zero-ops
devbox-zero-ops

Posted on

Why Most "Free" QR Code & Invoice Generators Expire or Upload Your Data (And How to Build 100% Static Browser Alternatives)

If you have ever printed a "free" QR code on a café menu or conference flyer only to watch it stop working 14 days later behind a paywall, you ran into the dynamic redirect trap.

Instead of encoding your actual destination URL (https://example.com) into the QR matrix, many commercial generators encode a short tracking URL (https://tracker.example/r/8f2a9) so they can expire the link once a trial ends. The same pattern shows up in "free" online invoice builders and PDF-to-JPG converters: you upload sensitive client billing details or contracts to a third-party server, only to hit a watermark or login wall at export time.

Every one of those workflows can run 100% locally in the browser with zero backend, zero file uploads, and zero expiring links. Here is how we built three zero-server static utilities for LocalVault Tools.


1. Static QR Codes That Literally Cannot Expire

A static QR code encodes the raw payload directly into the black-and-white modules—no redirect server exists in the middle, so as long as the destination exists, the code works forever.

The trickiest real-world edge case is Wi-Fi QR payloads (WIFI:T:WPA;S:...;P:...;;) and vCard 3.0 contact payloads, where unescaped special characters (;, :, ,, \) break iOS/Android camera scanners:

function escapeWifiField(value) {
  return String(value || "").replace(/([\\;,:"])/g, "\\$1");
}

function buildWifiPayload({ ssid, password, encryption = "WPA", hidden = false }) {
  const s = escapeWifiField(ssid);
  const p = encryption === "nopass" ? "" : escapeWifiField(password);
  return `WIFI:T:${encryption};S:${s};P:${p};H:${hidden ? "true" : "false"};;`;
}
Enter fullscreen mode Exit fullscreen mode

When rendering for print, two details matter far more than fancy logos:

  • Quiet zone margin (>= 4 modules around the matrix) so smartphone cameras can locate the finder patterns on busy flyers.
  • Foreground/background contrast (>= 3:1, dark modules on a light background) plus vector SVG export for sharp printing at any size alongside 256px–2048px PNGs.

You can test the live offline implementation here (URL, Wi-Fi, Plain Text, and vCard 3.0 with instant PNG & SVG export):
👉 Free Offline Static QR Code Generator


2. Zero-Upload Vector PDF Invoices with pdf-lib

Freelancers and small businesses rarely need a cloud accounting subscription just to send a clean PDF invoice—and they definitely do not want client names, bank details, and rates stored on an unknown server.

Using pdf-lib directly in the browser, you can generate crisp vector A4/Letter PDFs with multi-currency formatting, automatic tax/discount subtotals, and saved business templates in localStorage—without a single network request:

const { PDFDocument, StandardFonts, rgb } = PDFLib;
const doc = await PDFDocument.create();
const page = doc.addPage([595.28, 841.89]); // A4 in points
const font = await doc.embedFont(StandardFonts.Helvetica);

page.drawText("INVOICE #INV-2026-001", {
  x: 50,
  y: 780,
  size: 18,
  font,
  color: rgb(0.08, 0.12, 0.2),
});

const bytes = await doc.save();
const blobUrl = URL.createObjectURL(new Blob([bytes], { type: "application/pdf" }));
Enter fullscreen mode Exit fullscreen mode

Live tool (no sign-up, no watermark, 6 currencies, instant vector PDF download):
👉 Free Offline Invoice PDF Generator


3. Local PDF-to-JPG / PNG / WebP Rendering with pdf.js

Converting PDF pages to high-DPI images is another workflow people routinely upload confidential documents for. Rendering each page onto an offscreen <canvas> via pdfjs-dist at configurable 1x–3x scale and bundling the outputs client-side with JSZip keeps the entire document inside the browser tab:

👉 Offline PDF to JPG / PNG / WebP Converter


Open Source & Zero-Upload Architecture

All 10 utilities in LocalVault Tools (PDF merge/split, Images-to-PDF, PDF-to-JPG, Batch Image Compressor, Lossless EXIF/GPS Stripper, 3D STL Compressor, SVG-to-PNG & Favicon Pack, Invoice PDF Generator, and Static QR Code Generator) run strictly client-side and are open source under MIT:

What other everyday "upload-to-convert" tools still annoy you with hidden paywalls or watermarks? Drop them in the comments!

Top comments (0)