Own every byte of your PDF.

Generate, inspect, tag, encrypt, merge, and edit PDF files directly in TypeScript—without handing document creation to a runtime dependency.

sempdf
invoice.tszero runtime dependencies
import { createDocument } from "@crstnmac/sempdf";

const doc = createDocument({ title: "Invoice" });
const page = doc.addPage({ size: "A4" });

page.text("Invoice #1007", { x: 56, y: 780 });

const bytes = doc.toUint8Array();
Uint8Array readyExplore the API

One engine. The whole document lifecycle.

Start from a blank page or an existing file, then carry the same document through production and proofing.

Create

Lay out precise documents

Place text and vector paths, embed images, attach files, and serialize deterministic bytes.

Generation guide
Modify

Work with existing PDFs

Update metadata and forms, append overlays, reorder pages, and preserve incremental history.

Editing guide
Prove

Ship accessible output

Create tagged PDFs with semantic flow, structure trees, alt text, and validation warnings.

Accessibility guide

Start with a page. Leave with a PDF.

The playground puts editable document source beside its rendered output.

Open the playground