JavaScript PDF library

Nutrient Web SDK is an enterprise-grade JavaScript library designed for viewing, annotating, and editing PDFs directly in web browsers. It offers a comprehensive set of features for working with PDF documents in web applications.

Latest release: Discover what’s new! Check out our changelog for the latest release updates. Read more
Nutrient Copilot (preview): Be among the first to try our GitHub Copilot extension, tailored specifically for developers using Nutrient products. Built on top of GitHub Copilot, it integrates seamlessly with your favorite IDE and connects directly to Nutrient’s official documentation Try now for free

File type support

Nutrient Web SDK enables you to load, save, convert, and edit 15 different PDF, document, Office, and image file types.

Opening MS Office and image files requires the Office Files and Image Documents components to be enabled in your license.

PDF documents
Images
Office documents

Browser support

Nutrient Web SDK is compatible with the latest versions of popular browsers, including Google Chrome, Mozilla Firefox, Safari, Microsoft Edge, and Firefox ESR. For a complete browser compatibility list, visit our browser support page.

Chrome
Firefox
Safari
Edge
Firefox ESR

Framework support

Nutrient Web SDK is compatible with all JavaScript frameworks, including React, Angular, Vue, Svelte, Electron, Ruby on Rails, and TypeScript. It just needs a DOM container to append the viewer, which is possible with any framework.

Operational modes

Nutrient Web SDK can run locally in the browser or work together with Document Engine — either self-hosted or managed — to offload document storing, rendering, and editing. See the full comparison between the two operational modes here.

Open and view PDFs

To load PDFs, use the load method, which takes a Configuration object as its parameter. This object specifies where the document is loaded on the page, the path to the source document, the license key, and more. For more information, see the guides on loading a document.

Integrate AI Assistant with Nutrient Web SDK

To integrate AI Assistant with Nutrient Web SDK, pass the AI Assistant configuration and a generated JSON Web Token (JWT) to PSPDFKit.load(). For more information, refer to our guide on AI Assistant integration with Nutrient Web SDK.

Create PDF annotations

Annotations can be created using annotation constructors and the Instance#create endpoint. This will return a promise that will resolve to created annotations with generated IDs set. Once annotations have been edited, they’ll need to be persisted. This is done by saving them. Save them to external storage or embed them into the document. They can also be exported to Instant JSON. For more information, see our guide on creating PDF annotations using JavaScript.

Add a text form field

To create a form field, first create the form element — also known as a widget annotation. Since the form field requires a widget annotation ID when it’s created, you’ll need to generate a unique ID for your widget annotation via PSPDFKit#generateInstantId(). For more information, see our guide on how to create fillable PDF forms.

Perform OCR on a document

Note: OCR is available when using Nutrient Web SDK with Document Engine.
To perform optical character recognition (OCR) on a document, open the document from Document Engine and apply the performOcr document operation with Instance.applyOperations. For more information, see our guide on how to perform OCR.

Search and redact PDFs

To create redaction annotations based on specific search criteria, use PSPDFKit.Instance#createRedactionsBySearch(), which allows you to specify the search criteria, along with specifying a custom redaction annotation preset to be used when creating redactions based on search results. For more information, see our guide on searching and redacting PDFs.

FAQ

What is Nutrient Web SDK? Nutrient Web SDK is a powerful JavaScript PDF rendering engine that offers a customizable and responsive PDF viewer for web applications.
What file types does Nutrient Web SDK support? Nutrient Web SDK supports PDF, PDF/A, Word, Excel, PowerPoint, TIFF, PNG, and JPG file types for seamless viewing.
Is Nutrient Web SDK compatible with all browsers? Yes, it’s fully compatible with all modern browsers and devices.
Can I customize the UI of Nutrient’s PDF viewer? Absolutely! Adjust buttons, layouts, and the design to suit your application’s needs.
Do I need a server to use Nutrient Web SDK? No, Nutrient Web SDK can run locally in the browser, eliminating the need for server dependency. If you want more enhanced functionalities, you can combine Nutrient Web SDK with Document Engine — either self-hosted or managed — to offload document storing, rendering, and editing from the browser, streaming only essential data to the web viewer.

Free trial

Start your free trial for unlimited access and expert support.