@namahapdf/core
v1.0.0
Published
Headless in-browser PDF engine — parse, render, edit, annotate, sign, redact, fill forms. The core of the NamahaPDF SDK.
Readme
@namahapdf/core - Headless PDF SDK for JavaScript & TypeScript
@namahapdf/core is a headless, in-browser PDF engine - parse, render, edit,
annotate, sign, redact, and fill forms, fully on-device. It's the framework-agnostic
core of the NamahaPDF SDK: a client-side PDF rendering library for teams building
a custom viewer/editor UI, a non-React app, or anything that needs PDF processing
without uploading files to a server. No cloud conversion service, no per-document
server round-trip.
Live demo · Full docs · Get a license
npm i @namahapdf/coreimport { PDFParser, PageRenderer, configureLicense } from '@namahapdf/core';
// Apply your license key (without one, exports are watermarked + features limited).
configureLicense({ licenseKey: 'YOUR_KEY' });
const parser = new PDFParser(bytes);
const doc = parser.parse();
// …render to a canvas, run edit operations, export.Building a React app instead? @namahapdf/react
wraps this engine in a ready-made <NamahaEditor> component.
Features
- Parser - full PDF object model: xref tables/streams, encrypted PDFs, content-stream decoding
- Renderer - a canvas-based graphics engine for text, images, vector graphics, fonts/CMaps, patterns, and Form XObjects
- Editor - text edit/insert/replace, erase, move/resize, annotate, redact,
stamp, sign, AcroForm fill - all applied through a small, serializable
EditIntentpipeline - Compression - an image-aware PDF compressor with size/quality presets
- On-device by default - parsing, rendering, and editing all run client-side; no upload step, no server needed for the common path
- TypeScript-first, ESM + CJS builds, no bundler lock-in
- AI-ready - the same
EditIntentvocabulary a UI emits is JSON an LLM agent can emit too
Why teams pick @namahapdf/core
On-device by architecture, not by policy. Every parse/render/edit operation runs in the browser tab the file was opened in. There is no server round-trip, no document leaving the device - a structural privacy guarantee, not a promise, and a requirement for legal, healthcare, and fintech buyers building their own PDF tooling.
Framework-agnostic, headless. No React, no DOM assumptions beyond a <canvas> -
drop it into any JS/TS app, a Web Worker, or your own custom UI.
Built for round-trip fidelity. Edits apply through a small, JSON-serializable intent pipeline rather than regenerating the file from scratch, so untouched content survives byte-for-byte.
A PDFTron/Apryse-style SDK, priced and licensed transparently. Free to install and evaluate (watermarked); a per-domain license key unlocks the full feature set - no opaque enterprise sales process required to see pricing.
API surface
- Parsing -
PDFParser,PDFDocument,parseContentStream - Rendering -
PageRenderer - Editing - the
PDFEditSessionpipeline, annotation/form/sign/redact operations - Fonts -
EDITOR_FONT_FAMILIES(picker list),BUNDLED_FONT_FAMILIES/matchBundledFamily(bundled OFL faces used for picks and auto-substitution),setBundledFontBytesProvider(host hook for serving the font files) - Processors -
avniEngine,PDFEditProcessor(pipeline orchestration) - Licensing -
configureLicense,getLicenseState,isFeatureEnabled,assertFeature,shouldWatermark
The full API reference, licensed-feature gating table, and watermarking guide live in the core SDK docs.
Licensing
Free to install and use - trial mode renders a watermark and gates premium features
(assertFeature per operation). A per-domain license key removes the watermark and
unlocks the full feature set. Get one at
pdf.namahatech.com/sdk; pricing at
pdf.namahatech.com/pricing.
Related packages
| Package | What it is |
|---|---|
| @namahapdf/core | This package - the headless PDF engine |
| @namahapdf/react | Ready-made <NamahaEditor> React component |
| @namahapdf/pptx | Headless PowerPoint (.pptx) engine |
| @namahapdf/sheets | Headless Excel (.xlsx) engine |
FAQ
Does this upload PDFs to a server? No. Parsing, rendering, and editing all run in the browser process that loaded the library. Nothing is uploaded for the common path.
Do I need React to use this?
No - @namahapdf/core has no framework dependency. Use
@namahapdf/react if you want a
ready-made component instead of building your own UI.
Can it run in Node.js, not just the browser? The engine targets the browser (canvas rendering); some parsing/editing paths run in Node for server-side tooling, but rendering needs a canvas-capable environment.
Is there a free tier? Yes. It's free to install and use in trial mode (watermarked, feature-limited). See pdf.namahatech.com/pricing for licensed tiers.
Is it written in TypeScript? Yes - full type definitions ship with the package.
License: proprietary (see LICENSE). A license key from
pdf.namahatech.com/sdk removes the trial watermark
for production use. Questions or enterprise inquiries: same link.
