Home  ›  Playgrounds  ›  PDF Toolkit (v1.4.0)

PDF Toolkit — what's new in 1.4.0

pdfnative 1.4.0 adds a document-assembly toolkit: outline bookmarks, page labels, viewer preferences, nested lists, table cell borders & vertical alignment, and a page-tree API to merge / split / extract pages. Every demo below runs entirely in your browser and downloads a real PDF — open it in any compliant viewer (the bookmarks preset is best viewed in a desktop reader with a bookmarks panel).

Also new in 1.4.0, but Node-only (no browser demo): streamToFile() writes a streamed PDF to disk with back-pressure; a pluggable crypto provider (setCryptoProvider) lets you sign with native constant-time primitives; validateFontData() sanity-checks a font module; and the pdfnative-build-emoji-font CLI generates a colour-emoji module with exactly the glyphs you need.

View underlying code
v1.4.0 features exercised here:
  • Outline / bookmarksoutline: 'auto' derives a bookmark tree from headings; explicit OutlineItem[] supports nesting, bold/italic/colour, and collapsed nodes (open: false).
  • Page labelspageLabels renders roman front-matter then decimal body numbering in the viewer's page box.
  • Viewer preferenceslayout.viewerPreferences opens the bookmark panel and shows the document title in the window chrome.
  • Nested listsListItem entries nest bullet/numbered sub-lists to any depth.
  • Table cell borders & vertical alignmentcellBorders (solid / dashed / dotted) and cellVAlign per table or per column.
  • Page-tree manipulationmergePdfs, splitPdf, and extractPages rebuild a clean object graph from existing PDFs.

All zero-dependency, all in the browser. The exact same code runs in Node.js, Deno, Bun and Web Workers.