Skip to content

zeropdfZero-dependency PDF generation and editing in TypeScript.

Build, inspect, tag, encrypt, merge, and incrementally edit PDFs with a small public API and browser-friendly Uint8Array output.

Designed for library authors and product code

zeropdf keeps PDF workflows close to regular TypeScript: you compose a document, add pages and annotations, then write bytes wherever your runtime needs them.

ts
import { createDocument, rgb } from "@criston/zeropdf";

const doc = createDocument({
  title: "Invoice"
});

const page = doc.addPage({ size: "A4" });
page.text("Invoice #1007", {
  x: 56,
  y: 780,
  fontSize: 18,
  color: rgb(0.13, 0.2, 0.34)
});

const bytes = doc.toUint8Array();

Start with the getting started guide, then use the API reference when you need exact option types.

Released under the ISC license.