Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pspdfkit

Package Overview
Dependencies
Maintainers
0
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pspdfkit

View and annotate PDF files in your web app. Full support for mobile and desktop. Runs in the browser using WASM.

  • 2024.8.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
53K
increased by14.12%
Maintainers
0
Weekly downloads
 
Created
Source

Nutrient Web SDK (previously PSPDFKit)

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.

  • Customizable — Robust API for configuring behavior and appearance
  • Client-side — Workload is offloaded to client (no server needed)
  • Secure — Battle-tested, reliable PDFium-based PDF rendering engine
  • Office document support — View and convert Office documents without third-party dependencies
Image showcasing the popular features of Nutrient Web SDK

Getting started

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.

  1. Go to your project's root folder and run the following command in the terminal. It installs the Nutrient npm package and adds it as a project dependency:
npm install --save pspdfkit
  1. Run the following command to copy the Nutrient Web SDK distribution to the assets directory in your project’s root folder:
cp -R ./node_modules/pspdfkit/dist/ ./assets/
  1. 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.

  2. 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>
  1. Add the following code to the main JavaScript file of your application. This imports and instantiates Nutrient Web SDK:
import "./assets/pspdfkit.js";

const baseUrl = `${window.location.protocol}//${window.location.host}/assets/`;

PSPDFKit.load({
  baseUrl,
  container: "#pspdfkit",
  document: "document.pdf"
});

Web demos

File type support

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.

  • PDF, PDF/A (1, 2, 3, 4)
  • DOCX, DOC, DOTX, DOCM, XLSX, XLS, XLSM, PPTX, PPT, PPTM
  • PNG, JPEG, JPG, TIFF, TIF

Browser support

Our PDF SDK supports the latest versions of all commonly used browsers: Chrome, Mozilla Firefox, Safari, Edge, and Firefox ESR.

Integrations

Nutrient Web SDK is compatible with Salesforce, SharePoint, Microsoft Teams, and Microsoft OneDrive.

Documentation

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:

API

Read the full API reference.

Changelog

For a detailed list of the changes included in each version, refer to the changelog.

License and support

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.

Keywords

FAQs

Package last updated on 13 Dec 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc