PDF.js Express Version
Detailed description of issue
Hi,
in production, when I load a file with the PDF Express Viewer, I have this error message
"A valid license key is required to use the view only build of PDF.js "
However, I did create a license key and used it as an option parameter. It even perfectly works in localhost :
From my account, I have created 2 keys :
- one for the “localhost:3000” domain : it works.
- one for the domain capla360.com : I have the error.
I’m using a React app and used .env to set the 2 keys for the 2 different envs. I can’t figure out what’s going wrong…
Expected behaviour
the document should load in production, similarly to what is happening in localhost.
Does your issue happen with every document, or just one?
yest
Code snippet
Here how the WebViewer is configured.
WebViewer(
{
path: "../../../pdftron/public",
licenseKey: process.env.REACT_APP_PDFTRON_EXPRESS_KEY,
initialDoc: url,
},
viewerRef.current
);