For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

/** @type {import('next').NextConfig} */
const nextConfig = {
  webpack: (config) => {
    config.externals = [...config.externals, '@pdftron/pdfnet-node'];
    return config;
  }
}

module.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.

Last updated

Was this helpful?