Lay out precise documents
Place text and vector paths, embed images, attach files, and serialize deterministic bytes.
Generation guideGenerate, inspect, tag, encrypt, merge, and edit PDF files directly in TypeScript—without handing document creation to a runtime dependency.
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();Start from a blank page or an existing file, then carry the same document through production and proofing.
Place text and vector paths, embed images, attach files, and serialize deterministic bytes.
Generation guideUpdate metadata and forms, append overlays, reorder pages, and preserve incremental history.
Editing guideCreate tagged PDFs with semantic flow, structure trees, alt text, and validation warnings.
Accessibility guideThe playground puts editable document source beside its rendered output.