Detailed description of issue
I have integrated prfjs-express in my application with my license key and works well in local, but when I moved to dev or staging environment its not working.
Expected behaviour
{Provide a screenshot or description of the expected behaviour}
Does your issue happen with every document, or just one?
For every documents
Thank you for reaching out to pdf.js express forums,
Could you specify what you mean by not working? Does the viewer get instantiated? Is there a watermark?
Could you please provide any console error messages and screenshots?
It looks like from your screenshot that the viewer does not get instantiated. Do you have any screenshots of the console error messages for the staging environment?
Do you have the correct domain registered for your license key?
Do you have the correct path for the WebViewer constructor in the staging environment? Similar post available here: Webviewer initialization error
There is no console error. when trying to open a pdf, the screen just navigate back to the landing page instead of the actual DPF viewer. archre.com is the domain we use for our internal apps.
From the gif you posted, it looks like the viewer iframe does not get instantiated in the staging environment. It also looks like none of the request are being made that are related to pdf.js.
Can you confirm if the useEffect is being triggered for staging?
From the local video, the log ‘Web Viewer is instantiated’ shows up, but in the staging video, that log does not show up.
This could be due to the path attribute in WebViewer not being set up correctly. Could you please confirm if that is the case? Can you try removing the ‘initialDoc’ and see if the Web Viewer gets instantiated?
Do you instantiate the viewer when you click the PDF on the left pane? We recommend you to load documents via loadDocument() rather than creating a new Viewer when opening a new document.
We have tried everything, still resulting the same problem.
Can you confirm one thing ,
in local I can see PDFJS.express: Development environment detected. This license key is currently registered to www.archre.com
and our dev url is https://vinta-dev.archre.com
Is that fine or should url should be same as the key registered with?