I am encountering errors running PDFNet-Node with next.js 13 via NPM

In order to use our NPM package for Node.js with Next.js 13 and up an alteration has to be made in the Next.js configuration in your next.config

sh

1/** @type {import('next').NextConfig} */
2const nextConfig = {
3 webpack: (config) => {
4 config.externals = [...config.externals, '@pdftron/pdfnet-node'];
5 return config;
6 }
7}
8
9module.exports = nextConfig

This will ensure Next.js loads the binary packages inside of the NPM package. For more info refer to the next.js documentation.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales