PSPDFKit for Web
Add a PDF Web Viewer to Your Web App in No Time
View and annotate PDF files on the web. Use on both mobile and desktop. Choose from standalone or server-side deployment.
Easy Integration with






Features
Unrivaled PDF support for the web.

Powerful Features
Fast document rendering, easy navigation, and intuitive annotation tools including highlighting, drawing, and notes.
Easy to Integrate
Integrate with just a few lines of code, and customize with a rich API. Supports both server and standalone deployment.
Desktop and Mobile
Optimized for a great experience across mobile, tablet, and desktop. All modern browsers, including IE 11, are supported.

PDF Viewing
A fast and smooth viewing experience — even with large documents. Supports both single- and double-page layouts and page rotation. Intuitive document navigation via scrolling, pagination, pan, and zoom.

Responsive
Fluid, responsive design, including a smart adaptive toolbar. Full touch support for mobile, and browser support from IE 11 and up.

Forms
Full support for PDF AcroForms, so your users can view, fill out, and submit forms with ease. All form widgets are built with responsiveness in mind and work on both desktop and mobile.

Form Designer
Build workflows that enable your end users to create and edit PDF form elements. Use the Form Designer API to make and modify various PDF widget types — including text fields, checkboxes, and signatures — and build your own custom UI.

Document Editor
The Document Editor comes with its own convenient UI for page manipulation, making it easy to add, duplicate, rotate, reorder, delete, and import pages. It's backed by a powerful API, enabling you to build your own custom tools on top of it as well.

Digital Signatures
Digital Signatures enables you to apply and verify certificate-backed, encrypted signatures in PDF documents with ease. Digitally sign documents with complete confidence in their validity. View the validation status of digitally signed documents via the UI, or programmatically retrieve complete signature information with error detection using our API.

Instant Comments
Build collaborative workflows where multiple users can discuss specific sections in a document and receive responses in real time. Instant Comments is available for Server-backed deployments of PSPDFKit for Web and is powered by our Instant engine.

Text Highlighting
Easily mark up text on a document via an intuitive highlight menu with support for highlighting, strikethrough, and underlining.

Freehand Drawing
Draw anywhere on a document. Move and resize, and change appearance — including color, thickness, and opacity.

Text Annotation
Add text anywhere on a document. Move and resize, and change appearance — including font, size, alignment, and color.

Note Annotation
Add longer comments, which can be collapsed or expanded, to a document. Change appearance with a variety of shapes and colors.

Image Annotations
Easily attach, move, and resize JPEG and PNG images in a PDF document. Use PDFs as image annotations to have vector graphics support.

Stamp Annotations
Place stamps on a PDF with our predefined stamp templates, or let your users create their own using the stamp annotation builder UI. Easily swap out the default stamp templates with your own.

Search
Quickly search documents with a native-like search experience. Adapts to both mobile and desktop, with intuitive keyboard shortcuts for power users.

Sidebar
Choose from four sidebar options — Thumbnails, Outline, Annotations, or Bookmarks — to get an overview of the content in a document. Show and hide the sidebar at any time, resize it, or expand it into a full gallery view.

Localization
Built-in support for 29 languages, with the ability to add and customize localization and change locale at runtime.

Printing
Print and export documents, including all annotations. Use the system print dialog to allow for full control of the output.

Image Documents
Collaborate on images as you would with PDFs. Simply upload JPEG or PNG images, add your annotations, and print or export to PDF to share.

Office Files Support
Server-deployed PSPDFKit for Web enables you to open
and work with Word, PowerPoint, and Excel files while enjoying the same features
you’ve come to rely on for PDF documents.
Find out more →

Redaction
NEW
Use out-of-the-box presets or create custom text-matching patterns to search for
and apply redactions to personally identifiable information (PII) in your PDFs. Easily
build your own redaction confirmation UI to enable your users to select, preview,
and apply redaction annotations.
Find out more →

OCR
NEW
Recognize text in raster and vector PDFs to make it accessible
to annotation tools, screen readers, and automation workflows.
Find out more →
Browser Support
Fully tested across all modern browsers, and includes support for IE 11.

Powered by WebAssembly
Great performance, no server required
Simple drop-in integration for your app with no server-side component required. Behind the scenes, we run our proven and robust C++ core in the browser using state-of-the-art WebAssembly technology.
Deployment
PDF Web Viewer: Built for Easy Integration.
Server Deployment
Server-backed deployment requires the installation of our PSPDFKit Server component.
With rendering taking place on the server, the experience is smooth no matter the device. The client intelligently downloads pages on demand, providing a fast viewing experience for documents of any size. Your users’ data remains safe with you thanks to precise access control via JWT. More information about PSPDFKit Server as a document-managing solution can be found in our guides.
The server is delivered as a Docker container for easy deployment, and it can work with a dedicated file server or Amazon S3 cloud storage.
Unique Features:
- Opens large PDF documents in milliseconds.
- Built-in document and annotation management and archiving on Amazon S3 or a dedicated file server.
- Fine-grained authentication control over who has access to the original PDF document.
- Supports collaboration with PSPDFKit Instant.
- Server metrics — integrates directly with AWS CloudWatch or indirectly via Telegraf with GCP and Azure. Also available for any monitoring solution that supports the DogStatsD format.
Standalone Deployment

Web Assembly
Uses state-of-the-art WebAssembly technology
Learn more

PSPDFKit for Electron
Create cross-platform native apps using web technologies.
Learn more
Deploying and maintaining a dedicated server component is not always feasible, so we also offer a standalone deployment option that uses WebAssembly technology (with asm.js fallback for older browsers).
This deployment method requires nothing but the JavaScript files and essential assets.
The absence of a server component makes it easier to integrate this solution and allows you to rapidly deploy it into your existing website.
Unique Features:
- Workload is offloaded to clients.
- Runs in contexts where no server is available.
- Simple integration.
- Ability to easily manage and share document changes with support for both XFDF and Instant JSON .
PSPDFKit is trusted by some of the world’s leading companies











Integration
Using our PDF SDK
PSPDFKit for Web can be integrated with just a few lines of code,
and it comes with a rich API, which allows for complete customization.
1 2 3 4 5 6 7 8 9 10 | import PSPDFKit from "pspdfkit"; const instance = await PSPDFKit.load({ container: "#pspdfkit", document: "<pdf-file-path>", licenseKey: "YOUR_LICENSE_KEY_GOES_HERE" }); console.log("PSPDFKit for Web is ready!"); console.log(instance); |
1 2 3 4 5 6 7 8 9 10 11 12 13 | var PSPDFKit = require("pspdfkit"); PSPDFKit.load({ container: "#pspdfkit", document: "<pdf-file-path>", licenseKey: "YOUR_LICENSE_KEY_GOES_HERE" }) .then(function(instance) { console.log("PSPDFKit for Web loaded", instance); }) .catch(function(error) { console.error(error.message); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import PSPDFKit from "pspdfkit"; const toolbarItems = PSPDFKit.defaultToolbarItems; toolbarItems.reverse(); toolbarItems.push({ type: "custom", id: "cat", icon: "https://example.com/icons/cat.svg", mediaQueries: ["(min-width: 480px)"], onPress: () => alert("meow") }); PSPDFKit.load({ // ... toolbarItems }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | var PSPDFKit = require("pspdfkit"); var toolbarItems = PSPDFKit.defaultToolbarItems; toolbarItems.reverse(); toolbarItems.push({ type: "custom", id: "cat", icon: "https://example.com/icons/cat.svg", mediaQueries: ["(min-width: 480px)"], onPress: function() { alert("meow"); } }); PSPDFKit.load({ // ... toolbarItems: toolbarItems }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import PSPDFKit from "pspdfkit"; const { List, Rect } = PSPDFKit.Immutable; const { DrawingPoint } = PSPDFKit.Geometry; const { InkAnnotation } = PSPDFKit.Annotations; PSPDFKit.load(configuration).then(async instance => { var annotation = new InkAnnotation({ pageIndex: 0, boundingBox: new Rect({ width: 100, height: 100 }), lines: List([ List([ new DrawingPoint({ x: 0, y: 0 }), new DrawingPoint({ x: 100, y: 100 }) ]) ]) }); const createdAnnotation = await instance.createAnnotation(annotation); console.log(createdAnnotation.id); // => "01BS964AM5Z01J9MKBK64F22BQ" }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | var PSPDFKit = require("pspdfkit"); PSPDFKit.load(configuration).then(function(instance) { var annotation = new PSPDFKit.Annotations.InkAnnotation({ pageIndex: 0, boundingBox: new PSPDFKit.Geometry.Rect({ width: 100, height: 100 }), lines: PSPDFKit.Immutable.List([ PSPDFKit.Immutable.List([ new PSPDFKit.Geometry.DrawingPoint({ x: 0, y: 0 }), new PSPDFKit.Geometry.DrawingPoint({ x: 100, y: 100 }) ]) ]) }); instance.createAnnotation(annotation).then(function(createdAnnotation) { console.log(createdAnnotation.id); // => "01BS964AM5Z01J9MKBK64F22BQ" }); }); |
Check out our guides and API docs for more examples.
Example Projects

React
React example project

Webpack
Webpack example project

Node.js
Node.js example project

Ruby on Rails
Rails example project
Custom Integration

npm
Install via npm

Yarn
Install via Yarn
Migration

PDF.js
Migrate from PDF.js to PSPDFKit
Free 60-Day Trial
Download PDF SDK for Web - JavaScript PDF Viewer and try it in your app today.