Authoring+ — what's new in 1.5.0
pdfnative 1.5.0 adds SVG <text> rendering, an opt-in layout debug overlay, and a typed markup annotation model. The Edge case demos exercise the math font, the page-labels reader and control-character hardening. Every demo below runs entirely in your browser and downloads a real PDF.
Also new in 1.5.0: a bundled math / technical-symbols font (lang
'math', auto-routed via script detection), the pdfnative/tools font compiler/parser (compileFontData / parseFontData), a page-labels reader (getPageLabels()), and annotation read/write on existing PDFs (getAnnotations() / addAnnotation()).
View underlying code
v1.5.0 features exercised here:
- SVG
<text>— text elements render as upright PDF text withtext-anchor(start / middle / end) support, ideal for chart labels. - Layout debug overlay —
layout: { debug: true }draws margin / content / cell boxes;inspectDocumentLayout()returns per-page block geometry. - Markup annotations —
buildAnnotation()/buildAnnotationBody()for nine annotation types;getAnnotations()reads them back out of an existing PDF. - Math font — mathematical operators, arrows and letterlike symbols route to the bundled
'math'font automatically via script detection. - Page-labels reader —
getPageLabels()round-trips thepageLabelsnumber tree (Roman / decimal / prefixed) back into structured ranges. - Control-character hardening — NUL / BEL / form-feed / DEL embedded in text are dropped or escaped instead of emitting
.notdeftofu.
All zero-dependency, all in the browser. The exact same code runs in Node.js, Deno, Bun and Web Workers.