Skip to content

sdk.pdf.net vs pdf.js

pdf.js is a great viewer. sdk.pdf.net is an editor: edit text with reflow, build forms, and let AI agents change documents.

Which one fits your project

Choose sdk.pdf.net when

  • Users edit the page text itself, not just annotations on top
  • You build forms — placing fields, not just filling them
  • Your backend or an AI agent edits documents in code
  • You want one typed React 19 package, nothing to self-host
  • You want clear pricing and a real person on support
  • You care about load time — 0.8 MB, first page in 0.4 s

Choose pdf.js when

  • Users only read documents or fill in the occasional form
  • You need an Apache 2.0 license and the budget is zero
  • You need XFA forms, outlines, or attachments
  • You render on the server in Node.js
  • You don’t mind building the viewer yourself and hosting the worker, fonts, and cMaps

Feature by feature comparison

Checked against pdf.js 6.2.108, 2026-08-25
Featurepdf.js
Overview
What it is
Commercial PDF editing SDK for ReactOpen-source PDF viewer library, community-driven and supported by Mozilla
Licence
CommercialApache-2.0
Price
Free: 500 documents a month. Business $99.00 a month, 1,500 includedFree
Developers
UnlimitedUnlimited
Bundle, gzip
277 KB (index.js)504 KB (pdf.min.mjs + worker)
Support
Email and live chat on Business, SLA on EnterpriseGitHub issues and a Matrix room, no SLA
Engine and delivery
Engine
Own parser, font engine, and serializer on the main thread, no WASMJavaScript parser in a Web Worker, WASM helpers for JPX, JBIG2, and ICC
Side assets to host
None. CJK cmaps load as lazy chunkscmaps 1.11 MB, standard fonts 0.74 MB, wasm 1.47 MB, fetched on demand
Viewer UI
Viewport, PageCanvas, and about 55 hookspdf_viewer components: you wire PDFViewer, EventBus, find, and links yourself
TypeScript
Typed APIGenerated .d.ts
React
React 19 hooks and componentsThird-party wrappers
Viewing
Render pages
Text selection and extraction
Text search
Roadmap
Thumbnails
Password-protected files
Outline, attachments, layers
XFA forms
Render only (enableXfa)
Print
Editing
Edit page text in place, with reflow
Text styling: font, size, bold, italic, alignment, spacing
Undo and redo
Annotation editor only
Programmatic editing API for agents
Save changes to the file
prepareDocument(), full serializersaveDocument(), incremental update
Forms and annotations
Fill AcroForm fields and save
Create and edit form fields
Text, choice, checkbox, radio, push button
Field scripts
Acrobat date formats recognised, scripts not executedExecuted in a QuickJS sandbox (enableScripting)
Image stamps
Annotations
RoadmapFreeText, Ink, Highlight, Stamp, Signature, Comment
Read annotations already in the file
Roadmap
Digital signatures
Metadata; verification in Firefox only
Pages
Insert, delete, reorder pages
Merge documents
Collaboration and agents
Real-time collaboration
Roadmap
MCP server
Roadmap
Node.js
Legacy build with @napi-rs/canvas

Render a page in each

Both render into your own DOM. pdf.js gives you a canvas and layers to position. sdk.pdf.net gives you components and hooks that already know about selection, zoom, and editing.

render.ts — pdf.js
import * as pdfjs from 'pdfjs-dist';

pdfjs.GlobalWorkerOptions.workerSrc = new URL(
  'pdfjs-dist/build/pdf.worker.min.mjs',
  import.meta.url,
).toString();

const pdf = await pdfjs.getDocument({ data }).promise;
const page = await pdf.getPage(1);
const viewport = page.getViewport({ scale: window.devicePixelRatio });

canvas.width = viewport.width;
canvas.height = viewport.height;
await page.render({ canvas, viewport }).promise;
// Text selection and links are separate layers you add on top.
Editor.tsx — sdk.pdf.net
import { useEffect } from 'react';
import { PdfProviders, Viewport, useLoadPdf } from '@sdk-pdf/react';
import '@sdk-pdf/react/style.css';

function Editor({ file }: { file: Uint8Array }) {
  const [state, loadPdf] = useLoadPdf();

  useEffect(() => {
    void loadPdf(file);
  }, [file, loadPdf]);

  return state.status === 'ready' ? <Viewport /> : null;
}

export const App = ({ file }: { file: Uint8Array }) => (
  <PdfProviders>
    <Editor file={file} />
  </PdfProviders>
);

Moving off pdf.js?

Most teams keep pdf.js where it works and add sdk.pdf.net where it stops. The two do not share globals, so they can live on one page while you migrate.

  • Keep pdf.js for viewing, add PDFSDK for editing
  • API mapping guide: getDocument, text layer, annotationStorage, and saveDocument
  • The Free plan is the whole SDK, up to 500 documents a month
  • Hands-on migration help on Enterprise

Frequently asked questions

No. PDFSDK has its own parser, font engine, and serializer. Nothing from pdfjs-dist runs at runtime, and there are no cmap, font, or wasm folders to host.

Still deciding?

Tell us what your product does with documents and we will say plainly whether pdf.js is enough. One business day.

Book a call