Isaac Maw
Technical Content Creator
Published July 22, 2026
Updated July 23, 2026
7 min
React PDF Viewer FAQ: Developers’ Top Questions Answered
Isaac Maw
Technical Content Creator

Summary: This FAQ walks you through installing Apryse WebViewer, plus questions answered about displaying PDFs, and adding annotations, forms, and digital signatures. You'll also learn about WebViewer support for customizing the UI, handling password protected documents, and supporting 100+ file formats. Plus, see how WebViewer compares to open source react-pdf and other commercial SDKs so you can choose the right fit.

For adding document capabilities to React applications, developers need a robust, flexible React PDF viewer that supports not only accessible and user-friendly PDF viewing, but also extended functionality like page manipulation, conversion, PDF editing, and other document formats.
Apryse WebViewer is the most robust, flexible and feature-rich React PDF viewer SDK. It offers developers the client-side performance, customizability and broad file format support to streamline your stack and eliminate multiple libraries with one unified, scalable SDK.
In this article, we’ll answer the top developer questions about using Apryse WebViewer in a React project. If you have any unanswered questions left at the end of this FAQ, our docs, demo and sales team can help you find answers.
Getting Started & Installation
How do I install and set up a React PDF viewer using Apryse WebViewer?
Installing WebViewer is simple. You can try installing it today by getting your trial key. Our trial allows you to access all WebViewer features, including add-ons, so you can see how the SDK works before contacting sales to talk licensing. When you’re ready to use WebViewer in production, just replace the trial key with your license key.
Create React App was once the standard for scaffolding React applications, but it has since been deprecated in favor of tools like Vite. Once you have your React app built using Vite, follow these steps to install the WebViewer SDK. You can also follow our React WebViewer documentation guide for complete detailed instructions and a video walkthrough.
Step 1: Installation
Install WebViewer from npm:
npm i @pdftron/webviewer Step 2: Asset Copying
WebViewer needs access to its static assets at runtime, including WebAssembly modules, HTML, and CSS files. In a React project, you must copy these assets into the public directory so they can be served correctly. To do this, start by creating the public/lib/webviewer directory if it doesn't already exist in your project root:
npx --yes shx mkdir -p public/lib/webviewer Then copy all WebViewer static assets from node_modules/@pdftron/webviewer/public into the new public/lib/webviewer directory:
npx --yes cpy-cli "node_modules/@pdftron/webviewer/public/**/*" public/lib/webviewer Step 3: Component Integration
Next, instantiate the Apryse WebViewer SDK and mount it in your React project. This involves creating a container for the viewer and initializing WebViewer so it loads correctly at runtime.
In Visual Studio Code, replace the contents of the src/App.jsx file with the following and save:
Now, just replace the contents of the src/main.jsx file with the following and save:
Step 4: Verify Output
Now, you can see what your React app looks like in localhost with:
npm run dev What are the prerequisites for using Apryse WebViewer in a React project?
While the above instructions are for Vite, WebViewer is compatible with any standard React setup. You need a public folder to serve static assets. Because the rendering engine and all capabilities are developed by Apryse, no server-side or external dependencies are required for core capabilities. All processing takes place on the user’s device.
The only prerequisites for installing WebViewer are to install Node.js and npm, and have Visual Studio Code or another preferred code editor.
Core Features & Functionality
Once you have WebViewer set up in your React application, here are a few things you can do with it.
How do I display a PDF file in a React app?
The simplest way to open a PDF in WebViewer is with initialdoc, which sets the document that WebViewer will load when the app starts.
WebViewer provides various options to load a document. Whether you are loading a document through the initialDoc option in the constructor or calling loadDocument after mounting, you can always provide options to load your document.
Via the Constructor (initialDoc)
You can use the extension option to explicitly tell WebViewer what type of file it is. For example, extension: 'docx' or extension: 'png'. By default WebViewer will assume it's a PDF file but that might not be correct.
Loading via API (loadDocument)
Does the viewer support annotations, form filling, and digital signatures in React?
Yes. You can check out the full current list of WebViewer capabilities on our capabilities page. Note that while a wide range of document processing features are included in the base package, others are included in add-on packages. This helps WebViewer customers build the license that fits their needs, and scale as needs change. Chat with sales to learn more about choosing the right add-ons.
Annotations:
Annotations are included in the WebViewer base package. A range of annotations can be added to documents programmatically or via the UI. Annotations support in-depth audit trails and styling.
WebViewer supports:
- Text and shapes
- Stamps
- Custom annotations
- Links
- e-signatures
- Annotation permissions
- Rich text annotations
- Review and approval statuses
- Flatten annotations
- Import and export annotations
Forms:
An interactive form (sometimes referred to as an AcroForm) is a collection of fields (such as text boxes, checkboxes, radio buttons, drop-down lists, and pushbuttons) for gathering information interactively from the user. A PDF document may contain any number of fields appearing on any combination of pages.
Form filling is included in the base package, and form creation is part of the Digital Signatures add-on. Apryse SDK fully supports reading, writing, and editing PDF forms and provides utility methods to make working with forms simple and efficient. Using the Apryse SDK forms API, arbitrary subsets of form fields can be imported or exported from the document, new forms can be created from scratch, and the appearance of existing forms can be modified.
Apryse SDK benefits include:
- Fill PDF Forms
- Read PDF form field values
- PDF form field flattening
- Support for all form field properties and appearances
- Support for encrypted PDF forms
- Support for FDF (Forms Data Format)
- Import FDF to PDF
- Export FDF from PDF
- Forms templating
- Form field name management
- Create new form fields
- Support for JavaScript calculation in forms
Digital Signatures:
Developers building digital signature workflows are likely familiar with the EU eIDAS regulation, and the types of digital signatures it defines. Apryse supports all three types:
Simple Electronic Signatures (SES): a graphic-only signature with no cryptographic certificate. Easily implemented using the annotations tool.
Advanced Electronic Signatures (AES): The most common secure type of digital signatures, AES uses public key infrastructure to create a certificate that identifies the signer identity and the document version, allowing digital signatures to be securely verified. Apryse supports AES out of the box with the Digital Signature add-on for WebViewer.
Qualified Electronic Signatures (QES): These highly secure signatures are created using a qualified signature creation device and certificates from trust services supplied by the QTSP. Developers can build QES workflows with Apryse WebViewer, as long as the qualified elements are provided.
How does Apryse's React PDF viewer handle large or complex documents?
Large documents can cause some PDF viewers to hang, stutter and lag, especially when the size of the file exceeds the resources on the client device. WebViewer is highly optimized for performance, using techniques like linearization to render the first page quickly. You can demo the WebViewer experience with large files in our showcase.
What file formats besides PDF does the React viewer support?
Apryse supports 100+ file formats. You can view the full supported formats list in our documentation, but here are the most important formats for developers:
- MS Office (DOCX, XLSX, PPTX) without any server-side dependencies or MS Office licenses
- Images (JPG, PNG, TIFF)
- CAD files (DWG, DWF) with the appropriate add-on
- PDF/A and PDF/UA
Customization & Advanced Usage
Developers can easily customize WebViewer to meet the needs of the specific application.
How do I customize the UI and toolbar of the React PDF viewer?
The WebViewer modular UI is open-source and highly configurable. Developers can easily disable buttons, rearrange toolbar items, or change the theme through configuration options. For advanced customization, developers can fork the UI project or build a completely custom UI on top of the webviewer-core library.
Check out the UI documentation for details. Keep in mind that as of WebViewer 12.0, released in Summer 2026, Modular UI is now the default. The Legacy UI remains an option for developers to choose.
How do I handle password-protected PDFs in React?
Documents can be encrypted using industry standard PDF security with RC4 and AES. WebViewer will automatically prompt the user for a password when a protected document is loaded, and passwords can also be passed programmatically for automated workflows.
Check out the password protected document demo in our showcase, and find encryption/decryption sample code in our documentation.
Platform & Framework Support
Apryse SDKs are built for compatibility with a wide range of platforms, frameworks and languages, beyond React.
What frameworks does WebViewer support?
WebViewer is compatible with any JavaScript framework because it only needs a DOM element to place the document-viewing component. The following pre-built samples are available for quick integration, but it's easy to setup WebViewer with any framework.
- React
- Angular
- Vue
- Next.js
- Nuxt.js
- Electron
- Svelte
- Vite
- Cordova
- Blazor
- Node.js
Can I use the React PDF viewer on mobile with React Native?
Yes. React Native is a framework that allows cross-platform development for iOS and Android with one JavaScript/React codebase. You can learn how to implement a React PDF viewer in the blog, How to Build a Cross-Platform PDF Viewer with React and React Native. Check out the React Native documentation for our Mobile SDK.
Is the Apryse WebViewer accessible (WCAG compliant)?
Yes, Apryse is a leader in accessibility. In addition to our WCAG 2.2 Level AA compliant UI, WebViewer also includes tools that help users and developers bring documents up to accessibility compliance requirements, such as for document remediation. Check out the blog How to Solve PDF Remediation in Time for the 2026 ADA Deadline for more details on remediation tools.
WebViewer supports the requirements of WCAG 2.2 AA, including keyboard navigation, screen reader support, accessible color contrast, and more.
Comparison & Alternatives
These questions address considerations developers have when choosing the best React PDF viewer, including open-source libraries, Apryse, and other commercial SDK vendors.
What is the difference between open-source react-pdf and Apryse WebViewer?
React-pdf is a popular open-source library for rendering PDF documents in React applications. It's built on top of Mozilla's PDF.js, the browser-based rendering engine that also powers Firefox's native PDF viewer.
The right choice depends on scope. If the goal is simply displaying PDFs in a React app with limited interaction, react-pdf is a solid, no-cost option. If the application needs annotation, editing, form handling, multi-format support, or guaranteed rendering fidelity at scale, Apryse WebViewer's broader feature set and support model are built for that.
| react-pdf | Apryse WebViewer |
|---|---|---|
Cost | Free, open source | Commercial license |
Layer | React wrapper around PDF.js | Full SDK |
Core use case | Basic PDF viewing in React | Full document viewing, annotation, editing |
File format support | PDF only | 30+ formats |
UI | Minimal, build from scratch | Built-in, customizable components |
Editing and forms | Not supported | Supported out of the box |
Support | Community only | Enterprise-grade dedicated support |
How does Apryse compare to other commercial React PDF viewers?
Every major React PDF SDK can display a PDF, including SDKs from major commercial PDF SDK vendors such as Nutrient and Syncfusion. The real decision comes down to how much infrastructure your team has to build and maintain as the application grows beyond simple viewing.
For developers, Apryse WebViewer offers the following benefits that set it apart from other commercial React PDF viewer SDKs.
- One SDK for the entire document lifecycle. WebViewer starts as a React PDF viewer but extends into Office viewing, editing, annotations, forms, signatures, redaction, measurement, OCR, conversion, and AI-ready workflows, all without swapping out the underlying viewer. Many competing SDKs stay narrowly PDF-focused or require separate products for adjacent workflows.
- Broad document format support. WebViewer supports PDF, Office documents, CAD files, images, email formats, and more through the same SDK and UI, so a new format rarely means a new SDK.
- Client-side architecture with optional server components. Applications can run entirely in the browser, then add Docker or server components only when additional processing, conversion, or performance is needed. Teams aren't forced to commit to server infrastructure from day one.
- Highly customizable UI. WebViewer's UI is modular and can be extensively customized or replaced, letting developers hide tools, build custom workflows, or ship a fully branded experience.
- Shared rendering and processing engine. The same engine powers Web, iOS, Android, Windows, Linux, and Server SDKs, so teams building across platforms work with one API instead of troubleshooting inconsistencies between engines.
- Enterprise-scale performance. PDF linearization, incremental loading, WebAssembly, worker preloading, and optional server acceleration help applications handle large or complex documents without a rewrite down the line.
- Accessibility and compliance. WCAG 2.2 AA support, right-to-left language support, and CSP compatibility cut down on the accessibility and compliance work regulated industries would otherwise build themselves.
- A self-hosted, secure document lifecycle toolkit. WebViewer's client-side processing model keeps document data in the browser rather than routing it through third-party cloud services, which matters for teams handling sensitive documents. This is a meaningful contrast to solutions that lean on cloud-based services for AI-driven features, where documents or extracted data may need to leave the client environment.
What are the licensing options for Apryse WebViewer?
Apryse SDKs are licensed with modular add-ons separating additional features from the base package, so you don’t pay for tools you won’t use. Our sales teams work with you to find a licensing model that fits your needs. Visit our pricing page for more information, and check out the free trial to try all SDK features without paying a cent. To get detailed pricing that fits your use case, contact sales.
Wrapping Up
Whew! That’s a lot of questions answered in one lengthy blog article. To wrap up, WebViewer is designed for any JavaScript framework you want to use, including React. In addition, WebViewer goes beyond simple viewing to support a wide range of document processing capabilities, with additional capabilities such as data intake and extraction easily integrating using other Apryse products, such as the Server and Scanbot SDKs. To get more information about WebViewer, visit the product page. There you’ll find links to demos, documentation, and to contact sales.


