v1.0.0 — Stable release
pdfnative-react v1.0.0 — Stable release
The first stable release of pdfnative-react, the declarative React
renderer for the pdfnative PDF
engine. The public API is now covered by semantic versioning. This release
integrates the authoring features the engine added through 1.5.0 and ships the
conveniences originally planned for 0.4.0.
Breaking change
-
pdfnativeis now a peer dependency (^1.5.0), not a bundled one.
Install it alongside the wrapper:npm install pdfnative-react pdfnative react
This lets your app pin the engine version and matches how
pdfnativeis
already treated as external in the build. The engine floor is 1.5.0.
Highlights
- Bookmarks & page labels.
<Document outline={…}|"auto">builds the
viewer's bookmark tree;pageLabelscontrols page numbering (e.g. roman
front matter). Both PDF/A-safe. <Section>— a heading grouped with its content (title,level,
color,break).- Nested lists —
<Item>may nest a child<List>, directly nested
<Item>children, or use theitemsdata prop. - Richer tables —
cellBorders,cellVAlign, per-columnvAlignand
kind: 'amount'. - Layout inspection & debugging —
inspectDocument/inspectSpecreturn
page/block geometry without rendering;layout.debugoverlays the boxes. - Viewer preferences —
layout.viewerPreferences(page mode/layout,
toolbar visibility,displayDocTitle, …). - Constant-memory file output —
renderToFileStream/
renderSpecToFileStream, preserving outline and page labels. - Font & asset ergonomics —
resolveFonts(map)andoptions.fonts
(async entry points);validateFontData(data)to sanity-check a custom font
before embedding;fromUrl/fromBase64for<Image>bytes. - SVG
<text>renders as native, selectable PDF text. - AI-governance / human-in-the-loop contract —
.github/ai-governance.json,
.github/AGENT_RULES.md, docs/AI_GOVERNANCE.md, a
.github/drafts/staging area, and anpm run verify:issueCLI. AI agents act
strictly as draftsmen; the package makes no autonomous GitHub writes or network
calls. - 11 new samples and matching tests.
Quick start
npm install pdfnative-react pdfnative reactimport { Document, Section, renderToBytes } from 'pdfnative-react';
const bytes = renderToBytes(
<Document title="Report" outline="auto">
<Section title="Summary" level={1}>
<p>Revenue grew 14% quarter over quarter.</p>
</Section>
</Document>,
);Requirements
pdfnative^1.5.0(peer dependency)- React
^19.0.0 - Node.js
>=20
Scope
pdfnative-react covers document authoring. For byte-level post-processing —
merge/split, annotations, digital signatures, crypto providers, or font
compilation — use the pdfnative engine directly on the bytes this library
produces.
Full changelog: CHANGELOG.md.