This project demonstrates how to integrate PSPDFKit with a Next.js v15 application and locally host the Web SDK assets. Hosting the assets locally can improve load times, reduce dependency on external servers, and allow for a more controlled deployment environment.
Ensure you have the following installed on your machine:
Follow these steps to set up and run the project locally:
Clone the project repository to your local machine:
git clone https://github.com/PSPDFKit/pspdfkit-web-example-nextjs-15.git
cd pspdfkit-web-example-nextjs-15
pnpm install
Note: Usually you have to copy the web assets in your static files folder. In this project our
update-web-assets
script is handling this part for you. It's configured to update the web assets during the initial installation, before starting your dev server and before building your project to minimise frustration.
pnpm dev
pnpm build
pnpm start
You can now open http://localhost:3000 in your browser and enjoy!
This software is licensed under a modified BSD license.
Please ensure you have signed our CLA so that we can accept your contributions.