Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
View and annotate PDF files in your web app. Full support for mobile and desktop. Runs in the browser using WASM.
PDF SDK for document viewing and editing in the browser
Nutrient Web SDK (previously PSPDFKit for Web) is a secure JavaScript PDF library for viewing, annotating, and editing PDFs, Office documents, TIFFs, JPGs, and PNGs directly in the browser. It offers developers a way to quickly add document and image functionality to any web application. There are many awesome examples, and it comes supported by the amazing team at Nutrient. Our PDF SDK is fully compatible with React, Angular, Vue, Svelte, Next.js, Nuxt, Vite, Electron, and any other JavaScript or TypeScript framework.
Nutrient Web SDK can also be integrated into your Salesforce instance, as well as Microsoft Sharepoint, Teams, and OneDrive.
The guide below explains how to integrate our Web PDF SDK into a Vanilla JavaScript project. For other scenarios, refer to the step-by-step guides.
npm install --save pspdfkit
assets
directory in your project’s root folder:cp -R ./node_modules/pspdfkit/dist/ ./assets/
Rename the PDF document you want to display in your application to document.pdf
, and then add the PDF document to your project’s root directory. You can use this demo document as an example.
Add an empty <div>
element with a defined width and height to where Nutrient Web SDK will be mounted:
<div id="pspdfkit" style="width: 100%; height: 100vh;"></div>
import "./assets/pspdfkit.js";
const baseUrl = `${window.location.protocol}//${window.location.host}/assets/`;
PSPDFKit.load({
baseUrl,
container: "#pspdfkit",
document: "document.pdf"
});
Nutrient Web SDK enables client-side viewing and conversion of PDF, Word, Excel, PowerPoint, TIFF, JPG, and PNG files directly on any browser — no server dependencies or MS Office licenses are required.
Our PDF SDK supports the latest versions of all commonly used browsers: Chrome, Mozilla Firefox, Safari, Edge, and Firefox ESR.
Nutrient Web SDK is compatible with Salesforce, SharePoint, Microsoft Teams, and Microsoft OneDrive.
Nutrient offers comprehensive guides and code samples to help you quickly integrate and customize your application. It comes with full technical support that includes direct access to the engineers who built the product. Whether you have questions getting started with our PDF SDK, or you want to know how to best integrate new features into your app, we’re here to help you find a solution.
Most popular guides:
For a detailed list of the changes included in each version, refer to the changelog.
Nutrient is a commercial product that offers a free trial license to evaluate and integrate it into your product. Visit our pricing page to learn more about licensing our solution.
Copyright © 2010-2024 PSPDFKit GmbH.
FAQs
View and annotate PDF files in your web app. Full support for mobile and desktop. Runs in the browser using WASM.
The npm package pspdfkit receives a total of 36,552 weekly downloads. As such, pspdfkit popularity was classified as popular.
We found that pspdfkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.