Skip to content

v1.0.0 — Stable release

Choose a tag to compare

@Nizoka Nizoka released this 17 Jul 19:23
· 14 commits to main since this release
f5910c6

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

  • pdfnative is 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 pdfnative is
    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; pageLabels controls 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 the items data prop.
  • Richer tablescellBorders, cellVAlign, per-column vAlign and
    kind: 'amount'.
  • Layout inspection & debugginginspectDocument / inspectSpec return
    page/block geometry without rendering; layout.debug overlays the boxes.
  • Viewer preferenceslayout.viewerPreferences (page mode/layout,
    toolbar visibility, displayDocTitle, …).
  • Constant-memory file outputrenderToFileStream /
    renderSpecToFileStream, preserving outline and page labels.
  • Font & asset ergonomicsresolveFonts(map) and options.fonts
    (async entry points); validateFontData(data) to sanity-check a custom font
    before embedding; fromUrl / fromBase64 for <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 a npm run verify:issue CLI. 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 react
import { 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.