pspdfkit-web-example-react
pspdfkit-web-example-react copied to clipboard
Add PDF Support to Your Web App in No Time with PSPDFKit for Web
PSPDFKit for Web Example – React.js
This example shows how to integrate PSPDFKit for Web into a React app created with Create React App.
Prerequisites
Support and Issues
Are you evaluating our SDK? That's great, we're happy to help out! To make sure this is fast, please use a work email and have someone from your company fill out our sales form: https://pspdfkit.com/sales/
Getting Started
Clone the repo:
git clone https://github.com/PSPDFKit/pspdfkit-web-example-react.git
cd pspdfkit-web-example-react
Install the project dependencies with npm:
npm install
Running the Example
We are ready to launch the app! 🎉
To run the app in development mode:
npm start
To create a production build of the app and serve it:
npm run build
npx serve -s build
Enjoy 🍕
React Component
The React component which implements the PSPDFKit for Web integration can be found at src/components/PdfViewerComponent.
In order to make the files above available we had to copy them from the node_modules/pspdfkit/dist folder using a script which you can find at scripts/copy-pspdfkit-files.
License
This software is licensed under a modified BSD license.
Contributing
Please ensure you have signed our CLA so that we can accept your contributions.