v1.0.3 — extreme-script regression baseline, layout fix, playgrounds
Released 2026-04-25
Patch release adding extreme-script visual regression baselines, fixing a heading layout overflow on long compound titles, and shipping two new interactive playgrounds. No public API change — fully backward-compatible with v1.0.2.
Highlights
- Heading overflow fix — long titles such as
"Test Bengali + Devanagari ULTRA EXTREME — Shaping & Positioning — pdfnative"
no longer overflow the right margin;wrapText()now hard-breaks single
overlong tokens at character boundaries when no whitespace breakpoint
exists. - Extreme shaping samples — four new visual baselines under
test-output/extreme/covering BiDi (Arabic + Hebrew + Thai + Latin +
digits), Tamil ultra-conjuncts, Bengali + Devanagari reph + multi-halant
ligature chains, and isolated Arabic harakat. - Two new playgrounds —
extreme-scripts.htmlfor live shaping
stress-tests with editable presets, andmedical-800.htmlshowcasing
off-thread generation of an 800-page synthetic clinical report via Web
Worker +buildDocumentPDFStream. - Honest scoping — deeper shaping issues exposed by the new baselines
(Arabic isolated harakat anchoring, Thai mark stacking on tall
consonants, multi-stage Indic ligature chains, 3+ RTL-script BiDi) are
documented as known limitations and tracked for the v1.1.0 minor
release. They require GPOS table re-extraction in the pre-built font
data modules and exceed the scope of a SemVer-patch.
Fixed
- fix(core/layout):
wrapText()now hard-breaks single overlong
tokens at character boundaries when no whitespace breakpoint exists.
Long headings and titles previously could overflow the right margin
when no segment fit. Code points are honored so surrogate pairs and
combining sequences remain intact at slice boundaries.
(src/core/pdf-renderers.ts) - fix(docs):
guides/architecture.htmlandguides/faq.htmlfooter
links fromdocs/index.htmlpreviously 404'd because only.mdfiles
existed underdocs/guides/and.nojekylldisables auto-rendering.
Each guide now ships as a real HTML page with a clean URL.
Added
- feat(samples): new
extreme-shaping.tsgenerator producing four
visual-regression baselines undertest-output/extreme/:
extreme-bidi.pdf,extreme-tamil.pdf,
extreme-bengali-devanagari.pdf,extreme-arabic-harakat.pdf.
Wired intoscripts/generate-samples.ts. - test(integration):
tests/integration/extreme-shaping.test.ts—
five end-to-end builds covering the same extreme inputs to guard
against pipeline regressions (1 605 tests total, up from 1 600). - test(core): new regression tests for
wrapTextconfirming
character-level hard-break of overlong tokens and multi-line wrapping
of long em-dash titles. - docs(playgrounds): new interactive playground
docs/playgrounds/extreme-scripts.htmlfor stress-testing BiDi, Tamil
conjuncts, Bengali + Devanagari ligatures, and Arabic harakat directly
in the browser, with editable presets and a code preview. - docs(playgrounds): new
docs/playgrounds/medical-800.html— Web
Worker showcase generating an 800-page synthetic clinical report using
buildDocumentPDFStream, with live progress, byte/chunk counters,
optional Tagged PDF (PDF/A-2b), and a main-thread comparison toggle.
All patient data is generated client-side from a seeded RNG — no real
PHI. - docs(landing): static HTML guide pages (
quickstart.html,
architecture.html,faq.html,troubleshooting.html,
accessibility.html) plus a guides index at/guides/. - docs(guides): new
quickstart.mdcovering Node.js, browser,
multi-language, Web Worker, and streaming setups in a single page; new
accessibility.mdcovering tagged PDF, PDF/UA, PDF/A variants,
structure tree contents, alt-text discipline, and validation tooling.
Rewrotefaq.mdwith sectioned topics and ten concrete code snippets. - docs(readme): added a "Documentation" pointer block linking to the
guides and topdfnative.dev. Added Indic document samples
(doc-bengali,doc-tamil,doc-devanagari) to the Document Builder
Samples table. Added a "Citing pdfnative" section with BibTeX pointing
toCITATION.cff.
Changed
- docs(landing): added project-status badges to the
pdfnative.dev
hero (CI, CodeQL, OpenSSF Scorecard, npm version, monthly downloads,
bundle size, zero deps, TypeScript strict, npm provenance, MIT) to
mirror the README and surface supply-chain signals upfront. - docs(landing): rebuilt the "Try It Live" panel as a curated
10-example gallery (Quick Start, Financial, TOC, Barcode, SVG,
Watermark, Forms, PDF/A, Multi-language with lazy fonts, Streaming).
The runtime now supports top-levelawait, dynamicimport(…), and
exposesstreamDocumentPdf,registerFonts,loadFontData, and
signPdfBytes. - docs(landing): added "Guides" and "Playgrounds" entries in the
navbar and refreshed the footer with direct links to every guide and
both new playgrounds. - docs(landing): synced the test counter to 1 605+ tests.
Known limitations (tracked for v1.1.0)
The new extreme samples surface deeper shaping issues that are tracked
for the next minor release. They require either GPOS table re-extraction
in the pre-built font data modules under fonts/ or new OpenType lookup
implementations in the shaping pipeline, which exceed the scope of a
SemVer-patch:
- Arabic isolated harakat:
تشكيلwithout a base consonant fall back
to default mark positioning rather than precise font-anchored
placement. Visible inextreme-arabic-harakat.pdf. - Thai tall-consonant mark stacking: ป ฝ ฟ ฬ with three or more
combining marks may overlap with the current font anchor data. - Multi-stage Indic ligatures: ক্ষ্ম, क्ष्म, ஸ்ரீ are matched
greedily; some deeply-nested sequences fall back to non-ligated forms. - 3+ script BiDi paragraphs: Arabic + Hebrew + Thai + Latin + digits
in one paragraph may exhibit non-canonical run ordering at boundaries
with neutrals.
The full follow-up plan is tracked in
release-notes/draft-issue-v1.1.0-shaping-epic.md.
Install
npm install pdfnative@1.0.3Upgrade
No breaking changes. Drop-in replacement for v1.0.2.
The only behavioral change is wrapText(), which now hard-breaks
overlong tokens that previously overflowed the page. Existing layouts
that relied on overflow behavior (none expected — overflow was always
visually broken) should re-render with proper wrapping.