PDF.js displays PDFs. Kernstra edits them, text included.
The Kernstra Web SDK is a JavaScript PDF viewer and editor you embed in your web app. It changes the text already in a document, in the document's own font, and ships a finished interface with twenty-six tools: shapes, stamps, links, signatures, a page manager and passwords among them. PDF.js, Mozilla's free open-source viewer, displays PDFs and adds a few kinds of annotation on top of a page; it cannot change existing text, and the rest of an editor is yours to build. Every row below is checked against PDF.js 6.5.438 on 23 November 2026, with sources.
- True text editing in the document's own font
- Twenty-six tools, all at the $149 entry price
- A finished editor: toolbar, panels, undo and saving
- Free development key, and email support
- A viewer, free and open source
- No editing of the text already on the page
- Cannot add shapes, links or a password; no XFDF
- No vendor support; the interface is yours to build
Kernstra is a finished editor you configure. PDF.js is a viewer you build on.
PDF.js costs nothing to download. The cost is what you build around it, the features you switch on and maintain yourself, and having nobody to call when something breaks.
| Kernstra | PDF.js | |
|---|---|---|
| What arrives | A finished viewer and editor: toolbar, panels and twenty-six tools, each switched on or off in configuration | A rendering library on npm (pdfjs-dist, with no viewer page), and a separate prebuilt viewer that Mozilla asks you to re-skin or build upon, not embed unmodified |
| The features Firefox shows | Every tool on this page is in the package you install | Signatures, comments and page organizing are on in Firefox on desktop and off by default in the downloadable viewer (6.5.438); each is one viewer option to switch on |
| React, Vue and Angular | An integration guide and an example project for each, and for Svelte, Next.js, Nuxt and SvelteKit | No official components; community wrappers such as react-pdf, ngx-extended-pdf-viewer and vue-pdf-embed |
| Support | Email support from the entry plan; priority and SLA on larger ones | No vendor support or SLA; GitHub issues and a Matrix chat room |
| Browsers | The last two versions of Chrome, Edge, Firefox and Safari, and Firefox ESR | The default build is tested on Firefox and Chrome; Safari 18 and later are listed under the legacy build as "Mostly" supported ("no problems in general"), and the legacy build has no automated testing |
| Updates | Versioned releases with a published changelog | A release about once a month; API options and the minimum Node.js version have changed in minor releases, minimum browser versions in major ones |
| What you serve | Your bundle; the engine and fonts download from our asset store, or from your own host under a self-hosting license | Your bundle, the worker, character maps, standard fonts, WebAssembly decoders and color profiles, from your own host or a public CDN |
| Price | From $149 a month, published, with every tool included | Free to download; the interface, the upkeep and the support are your own engineering time |
| License | Commercial, per production app | Apache 2.0, open source |
| Before you pay | Free development key with the whole SDK, watermarked, never expires | Nothing to pay |
Kernstra vs PDF.js, feature by feature: what PDF.js leaves out.
Kernstra edits existing text, adds shapes, stamps, links and passwords, threads comments and exports XFDF. PDF.js cannot edit text, add shapes, links or passwords, or export XFDF; its stamps are images you supply and its comments have no replies. It also leaves signatures and page tools switched off in the viewer you download. The PDF.js column is release 6.5.438: where a feature is on in Firefox but off in the download, the row says so.
| Kernstra | PDF.js | |
|---|---|---|
| In Kernstra, missing or partial in PDF.js | ||
| Edit existing text in the document's own font | Included: Retype, restyle or move it; included at the $149 entry price | Not available: Adds new text on top of the page; cannot change the words already there |
| Shapes: rectangle, ellipse, line, arrow, polygon, polyline | Included: Stroke and fill; dashed or dotted lines, cloudy borders on closed shapes | Not available: Displays existing ones; cannot add them |
| Underline and strike out text | Included: From a text selection, with highlight and comment | Not available: Displays existing ones; adding them is an open request |
| Stamps: Approved, Draft, Confidential, or your own | Included: Ready-made, your own artwork, or one you build | Partly, or off by default: Places an image; no ready-made stamps |
| Add links to a web address or another page | Included | Not available: Follows existing links; cannot add one |
| Set a password and permissions | Included: AES-256 open password, and limits on printing, copying and editing | Not available: Opens protected files; cannot protect one |
| Comments with threaded replies and review status | Included: Comments panel | Partly, or off by default: Single comments with a sidebar; on in Firefox, off by default in the download |
| Export and import annotations as XFDF | Included: From the API | Not available: Annotations are saved into the PDF only |
| Ready in Kernstra, off or unfinished in PDF.js | ||
| An interface you can ship as it is | Included: Toolbar and panels; each of the 26 tools switched on or off | Partly, or off by default: A default viewer; Mozilla asks that you re-skin it or build upon it |
| Drawn, typed or uploaded signatures | Included: On in the package; saves up to three for reuse | Partly, or off by default: In Firefox since version 137; off by default in the download |
| Reorder, delete, extract and merge pages | Included: Page manager, with insert, rotate and duplicate | Partly, or off by default: On in Firefox since versions 150 and 151; off by default in release 6.5.438 |
| React, Vue and Angular | Included: Guides and examples, plus Svelte, Next.js, Nuxt and SvelteKit | Partly, or off by default: No official components; third-party wrappers |
| In both | ||
| Renders in the browser, no server needed | Included: Always | Included: Always; static files are enough |
| Large files open before the download finishes | Included: Page streaming: a 107 MB file opens after about 0.2 MB | Included: HTTP range requests and streaming |
| Text selection and search | Included | Included |
| Highlights, text boxes, drawing and images | Included: Plus sticky notes, and tick, cross and dot marks | Included: Highlight, text, ink and image editors |
| Fill existing forms | Included: Keeps Acrobat's number formats, date pickers and calculations | Included: AcroForm, and XFA rendering; saves the filled file |
| Phone, tablet and desktop | Included: One configuration, laid out from the container | Included: Touch and pinch zoom; a separate mobile viewer example |
| TypeScript types | Included: Written in strict TypeScript | Included: Generated from its JSDoc comments |
| Documents never sent to a vendor | Included: By design; one license status check per load, no telemetry | Included: No vendor, and no telemetry in the build you host |
| In neither today, and where PDF.js differs | ||
| Build new forms in the viewer | Not available: Form Designer coming next | Not available |
| Certificate-based digital signatures (PKI) | Not available: Lists existing ones; does not create or validate them | Not available: Cannot create them; verification is experimental and off, and only Firefox has a verifier |
| True redaction (content removed from the file) | Not available: Black-out covers, it does not remove | Not available: Drawing over text does not remove it |
| OCR for scanned pages | Not available | Not available: An open request since 2022 |
| Accessible viewer | Partly, or off by default: Accessible text layer and ARIA page regions, designed for a WCAG 2.1 review; audit report to follow | Partly, or off by default: Reads tagged PDFs to screen readers; publishes no WCAG conformance statement |
| Source code you can read and change | Not available: Commercial license | Included: Apache 2.0 |
The PDF.js column comes from the project's own repository, documentation, release notes and issue tracker, and from Firefox's release notes, all listed in the sources. "Firefox" is Firefox on desktop; on Android its PDF editing is switched off. "The download" is the prebuilt viewer of release 6.5.438 (1 November 2026) with its default options, where each feature marked off by default can be switched on with a viewer option; the pdfjs-dist package on npm is the library without a viewer page, where the editors are components you build an interface around, and which can extract pages and read signature data from code. A change merged on 9 November 2026 switches page organizing on by default in the release after 6.5.438. Checked 23 November 2026. Sources
Why teams move from PDF.js to Kernstra, and when PDF.js is enough.
Choose Kernstra if
- Users need to change the words on the page. Kernstra retypes existing text in the document's own font, with the paragraph rewrapping. PDF.js adds text on top of a page and cannot edit what is there.
- You want an editor, not a project. The toolbar, panels, undo history and saving are finished; you choose which of the twenty-six tools to show instead of building an interface around a rendering library.
- Reviews need more than a highlight. Kernstra adds shapes, underline and strikeout, stamps, links and comments with threaded replies and review status, and exports annotations as XFDF. PDF.js has no shapes, underline, strikeout, links or XFDF to add, only image stamps and single comments.
- Signing, pages and passwords should work on day one. The Signature tool, the page manager and AES-256 passwords are in the package you install. The PDF.js download leaves signatures and page tools off by default, and cannot protect a file.
- Someone has to answer. Kernstra has email support from the entry plan and supports the last two versions of Safari; PDF.js is supported by its community, and lists Safari as mostly supported, without automated tests.
PDF.js is enough if
- You only need to display PDFs. For reading, searching and printing it does the job at no cost. The day users ask to change a word or draw a box around one, that work is yours to build.
- It has to be open source. Apache 2.0 lets you read and change every line. Kernstra is a commercial license from $149 a month, with a free development key.
- You want to build your own viewer, and have the engineering time to build it and to keep up with a release about once a month.
Switching from PDF.js to Kernstra.
A PDF.js integration is a document loader, a page loop and the layers you stacked on each canvas. Kernstra replaces those with one element.
- 1Take a free development keyRun Kernstra beside your PDF.js viewer on localhost or any HTTPS host. The key is free and never expires; its output is watermarked.
- 2Replace the loader and the page loop
Kernstra.init(),PDFDocument.fromUrl(url)andnew PDFViewer(container, doc, options)replacegetDocument(), the render loop and the text and annotation layers. Scrolling, zoom, search and printing come with the viewer. - 3Keep your range requestsIf your server already answers HTTP range requests for PDF.js,
PDFDocument.fromUrlProgressive(url)uses them to open large files before the download finishes. - 4Choose the toolsSwitch on the tools your users need in configuration, or hide the toolbar and drive each tool from your own buttons through the API.
- 5Go live monthlyMove to a production key when you are ready: from $149 a month for an internal app, with no minimum term on monthly billing.
Questions about PDF.js and Kernstra.
Anything else, ask in the quote form and an engineer answers in writing.
Ask in the quote formCan PDF.js edit a PDF?
Not the text that is already there. PDF.js adds annotations on top of a page and fills forms; its own FAQ says it is designed for reading PDF files, with annotation editing for a subset of annotation types. It cannot retype a sentence, add a rectangle, line or arrow, add a link, or set a password. The Kernstra Web SDK does all of those: it edits existing text in the document's own font, with the paragraph rewrapping, and ships twenty-six tools in a finished editor, from $149 a month. You can try it on your own PDF in the playground.
What are the best PDF.js alternatives?
For a viewer that also edits, the Kernstra Web SDK: it changes existing text in the document's own font, adds shapes, stamps, links, signatures and passwords, manages pages, and comes with its interface finished, from $149 a month with a free development key. Other commercial SDKs are Nutrient, Apryse, ComPDF and Syncfusion, each compared with Kernstra on its own page. If you only want PDF.js inside a framework component, react-pdf, ngx-extended-pdf-viewer and vue-pdf-embed wrap it for React, Angular and Vue, with the same limits as PDF.js; pdf-lib writes PDF files from code and displays nothing.
What does Kernstra do that PDF.js does not?
Kernstra edits the text already in a PDF, in the document's own font. It adds rectangles, ellipses, lines, arrows, polygons and polylines, underline and strikeout, stamps, links, and AES-256 passwords with permissions. Its comments have threaded replies and review status, and annotations export and import as XFDF. Signatures and the page manager are on in the package you install, where the PDF.js download leaves them off by default. It comes with a finished toolbar and panels, guides for React, Vue, Angular, Svelte, Next.js, Nuxt and SvelteKit, and email support. PDF.js is free and open source; Kernstra is a commercial SDK from $149 a month.
What annotations does PDF.js support?
Fewer than a review usually needs. PDF.js displays the annotations already in a PDF, and release 6.5.438 can add five kinds: highlights, free text, ink drawings, images and signatures, and attach a comment to a highlight, drawing, image or signature. Signatures and comments are on in Firefox on desktop and behind a viewer option elsewhere. It cannot add shapes such as rectangles, lines and arrows, underline or strikeout, or links; its comments have no replies or review status; and there is no XFDF export. Kernstra includes shapes, underline and strikeout, sticky notes, stamps, links, threaded comments with review status, and XFDF export and import.
Can you sign a PDF with PDF.js?
Not out of the box in the viewer you download: the signature editor is on in Firefox, since version 137, and sits behind an option that is off by default elsewhere. It places an image of a signature and cannot create a certificate-based digital signature. In Kernstra the Signature tool is in the package you install: type it, draw it, or upload a photo of a wet signature, place it, and save up to three for reuse. Kernstra does not create or validate certificate signatures either.
Can PDF.js fill PDF forms?
Yes, PDF.js fills existing forms: AcroForm fields, XFA rendering and form JavaScript in a sandbox, saved with saveDocument(). It cannot create form fields. Kernstra fills forms too, keeping Acrobat's number formats, date pickers and calculated fields, and adds what a filled form usually needs next: a signature, tick and cross marks, and editing the text around the fields. Its Form Designer is coming next.
How do I use PDF.js with React, Vue, Angular or Next.js?
PDF.js has no official framework components, so you use a community wrapper or wire the library yourself. react-pdf, ngx-extended-pdf-viewer and vue-pdf-embed are third-party projects built on PDF.js. The usual first hurdles are the worker, which must be the exact same version as the library, and the character maps, fonts and WebAssembly decoders, which you copy to your own host or load from a CDN. For Next.js, react-pdf says to skip server-side rendering, and the PDF.js maintainers have said they have no experience with that framework and cannot support it. Kernstra has an integration guide and an example project for each of React, Vue, Angular, Svelte, Next.js, Nuxt and SvelteKit. Our guide to embedding a PDF in HTML renders a first page with pdfjs-dist, and shows when a plain iframe is enough; to go further, build a PDF.js viewer step by step, with every page, zoom, selectable text and search. In React, our react-pdf example builds the same viewer with react-pdf 11, including the Next.js setup.
What is the difference between the PDF.js viewer, the Firefox PDF viewer and pdfjs-dist?
They are three builds of the same project with different features switched on. Firefox on desktop has every editor on. In the prebuilt viewer of release 6.5.438, the signature editor, comments, and page organizing and merging are compiled in, and their options default to off, so a PDF.js viewer you host lacks them until you set those options. The pdfjs-dist package on npm has no viewer page at all, only the library and viewer components to build one from. Page organizing was switched on by default in the project's main branch on 9 November 2026, for the release after 6.5.438. Kernstra is one package: every tool on this page is in what you install, switched on or off in configuration.
What is the difference between PDF.js and pdf-lib?
PDF.js reads and displays PDFs; pdf-lib creates and modifies PDF files and displays nothing. Some teams that need to write changes PDF.js cannot make run the two together, each parsing the file on its own. pdf-lib has had no release since version 1.17.1 in November 2021; a fork, @cantoo/pdf-lib, is maintained by another team. Kernstra views and edits with one engine, so what the user sees is what gets saved.
Is PDF.js free for commercial use?
Yes. PDF.js is licensed under Apache 2.0, which allows commercial use, modification and redistribution at no cost, provided you keep the license and notices and mark the files you change. What the license does not give you is a finished product or anyone to call: there is no vendor support or SLA, Mozilla asks that a site embedding its viewer re-skin it or build upon it, and anything beyond its annotation editors is yours to build. Kernstra is a commercial SDK from $149 a month, with a free development key, email support and every tool included.
Is PDF.js safe?
Yes, if you keep it updated yourself. PDF.js runs in the browser sandbox and is supported by Mozilla, whose security team handles reports. It has had two high-severity advisories in recent years, both letting a malicious PDF run JavaScript in the hosting page: CVE-2024-4367, fixed in version 4.2.67, and CVE-2026-16633, fixed in version 6.2.108. Each was fixed in a release, and applying that release is up to you, so pin a current version and set a content security policy.
What is PDF.js?
PDF.js is an open-source JavaScript library, supported by Mozilla, that parses and renders PDF files in the browser, and the PDF viewer built into Firefox. It is licensed under Apache 2.0 and published on npm as pdfjs-dist; its current release is 6.5.438, of 1 November 2026. It is a viewer: it displays a PDF and adds a few kinds of annotation on top. To change the text in a document you need an editor, which is what the Kernstra Web SDK is.
Is Kernstra built on PDF.js?
No. Kernstra does not use PDF.js. It is built on the PDF engine Chromium uses, compiled to WebAssembly and run in the browser, for rendering quality and reliability on real-world files. Like PDF.js it works on the user’s device, with no server and no upload.
Open one of your own PDFs and change a sentence in it.
A free development key, the whole SDK, and a published price you can check without a call.
Sources, checked 23 November 2026
PDF.js is an open-source project supported by Mozilla. Mozilla and Firefox are trademarks of Mozilla.org in the U.S. and other countries; Kernstra is not affiliated with Mozilla. Every claim about PDF.js on this page comes from the public sources listed here, read on 23 November 2026. If anything is wrong or out of date, tell us at hello@kernstra.com and we will correct it.
- mozilla/pdf.js: README
"PDF.js is community-driven and supported by Mozilla"; a general-purpose, web standards-based platform for parsing and rendering PDFs; the library and its worker script are both needed.
- mozilla/pdf.js: LICENSE
Apache License, Version 2.0, provided "as is", without warranties.
- PDF.js: Getting Started
The three layers (core, display, viewer); the prebuilt viewer "can be a good starting point for building your own viewer. However, we do ask if you plan to embed the viewer in your own site, that it not just be an unmodified version. Please re-skin it or build upon it."
- PDF.js: Frequently Asked Questions
"PDF.js is designed for reading PDF files and supports rendering annotations for viewing, but also supports adding annotations using a subset of the possible annotation types"; the browser table (the default build tested on Firefox and Chrome; the legacy build for Safari 18 and later, "mostly", automated testing "none"); HTTP range requests render a document without fully loading it; the library and worker versions must match.
- PDF.js release v6.5.438
The current stable release; releases through 2026 came about once a month, from 5.4.624 on 1 February to this one.
- web/app_options.js at v6.5.438
The viewer options and their defaults in the generic build: enableComment, enableSignatureEditor, enableSplitMerge, enableMerge and enableSignatureVerification are false; enableScripting is true.
- Enable the split/merge feature by default (pull request 22475)
Page organizing and merging, on in Firefox, switched on by default in the main branch, after release 6.5.438.
- src/shared/util.js at v6.5.438
The editor types, in full: free text, highlight, stamp (an image), ink, popup, signature and comment (popup and comment are the comment mode: a comment is attached to another annotation). None edits page content, adds a shape, a link, an underline or a strikeout, or adds a form field; the stamp editor places an image.
- web/pdf_viewer.js at v6.5.438
The annotationEditorMode option of the viewer component "enables the creation and editing of new Annotations"; its default is none. Toolbars and dialogs belong to the viewer page, not to the library.
- src/display/api.js at v6.5.438
saveDocument() returns the full data of the saved document, and no option of it sets a password or permissions (the password option of getDocument opens a protected file); enableXfa renders XFA forms; annotationStorage is "storage for annotation data in forms", with no export format; the asset addresses an integrator sets (cMapUrl, standardFontDataUrl, wasmUrl, iccUrl); range and streaming options.
- PDF.js release v6.0.227
A major release: the minimum supported browsers were raised (Chrome 125, Safari 18) and API members removed; the notes recommend checking the changes marked api-minor and api-major, "since those might require updates to your code." Earlier minor releases raised the minimum Node.js version to 22 (5.7.284) and replaced API options (5.6.205).
- Remove support for calling getDocument without a parameter object (pull request 21245)
A maintainer: "in practice it's now unlikely that calling getDocument without additional options will work except for the most trivial PDFs", noting character maps, standard fonts, WebAssembly image decoders and ICC color spaces.
- react-pdf: README
A third-party React wrapper: "The PDF.js worker must match React-PDF's exact pdfjs-dist version"; "In Next.js, make sure to skip SSR when importing the module you're using this code in"; the steps to copy character maps, standard fonts and WebAssembly files.
- pdfjs-dist canvas module parse failed (issue 16214)
A maintainer, on Next.js: "that's not a Framework that we use or know anything about here; hence we unfortunately can't provide any help/support for it."
- Next.js route transition frequently aborted after adding pdfjs-dist (issue 20555)
A collaborator: "we don't have experience with Next.js, so any questions relating to integration with that should be asked in other places/forums where such experience is available."
- ngx-extended-pdf-viewer: README
A third-party Angular component that bundles its own build of PDF.js and its viewer.
- vue-pdf-embed: README
A third-party Vue component built on pdfjs-dist.
- Please STOP posting issues here (pdf-lib issue 1720)
The maintainer of a fork: "This project is currently on HOLD, but we maintain a fork". The last pdf-lib release is 1.17.1, of 6 November 2021; the fork is @cantoo/pdf-lib.
- pdfme: README
An open-source project that states the pairing: "pdf-lib: Used for PDF generation." and "PDF.js: Used for PDF viewing."
- mozilla/pdf.js: examples
The official examples: components, learning, mobile-viewer, node, text-only and webpack. No React, Vue or Angular component.
- pdfjs-dist on npm
Version 6.5.438, Apache 2.0, with TypeScript types; the package holds the library, viewer components, character maps, standard fonts and WebAssembly decoders, and no viewer page.
- Firefox 137 release notes
"Now you can sign PDFs without leaving Firefox. Save your signatures to re-use later."
- Firefox 145 release notes
"Add, edit, and delete comments to make your own notes in PDFs", with a comment sidebar.
- Firefox 150 release notes
"You can now use Firefox's built-in PDF editor to reorder, copy, paste, delete, and export pages in a PDF."
- Firefox 151 release notes
"You can now merge multiple PDFs directly in Firefox PDF."
- Add rectangle (square) annotation support in PDF.js (issue 20146)
Open. A maintainer: "We agree it would be nice, but unfortunately we'd first need to have a UX design to implement." A collaborator notes a rectangle would not be a redaction tool, "as it doesn't actually delete the text underneath."
- Underline and strikeout annotation editors (issue 18683)
Open. A maintainer: "we should probably have a design specification from Firefox UI/UX before starting work on this."
- Draw tool should warn users that it shouldn’t be used for redaction (issue 18203)
Open: drawing over text leaves the text in the file.
- Support OCRing documents to give text selection and copy & paste to image based text (issue 15843)
Open since 2022. A maintainer: "There are no progress for the moment: it's still something we think about but have some other priorities."
- Digital Signature and Certificate verification (pull request 21247)
"This is an initial version of the feature off-by-default." Verification runs in Firefox only; nothing creates a certificate signature.
- Implement digital signature validation (issue 13351)
Closed on 30 June 2026 by pull request 21247. A maintainer, earlier: "About having this feature in pdf.js as a lib, for now there are no plans." The library exposes signature data; the generic viewer has no verifier.
- Security advisory GHSA-wgrm-67xf-hhpq (CVE-2024-4367)
High severity: a malicious PDF could run JavaScript in the hosting domain; pdfjs-dist 4.1.392 and earlier, fixed in 4.2.67.
- Security advisory GHSA-hq66-cqwq-w95j (CVE-2026-16633)
High severity: with scripting enabled (the default) and no content security policy, a malicious PDF could run JavaScript in the hosting domain; pdfjs-dist from 5.6.83 up to, not including, 6.2.108, where it is fixed.
- mozilla/pdf.js: security policy
Vulnerabilities are reported through Bugzilla and handled by the Mozilla security team.
- web/external_services.js at v6.5.438
The base reportTelemetry() does nothing, and the generic build (web/genericcom.js) does not override it; telemetry belongs to the Firefox build.
- web/comment_manager.js at v6.5.438
The comment sidebar and dialog: single comments, with no reply or review-status interface.
- web/struct_tree_layer_builder.js at v6.5.438
Builds the structure tree of a tagged PDF for assistive technology. The project publishes no WCAG conformance statement.
- Firefox: PdfJsOverridePrefs.js (release branch)
Where Firefox switches on the editors that the generic build leaves off; on Android annotation editing is disabled, and signature verification is off by default.