PDF JS Express not working in dev or staging environment

Hi there,

The subdomain will work, please take a look at a similar forum post here:

As seen from the post, the issue seems to relate to the network request missing from your staging site. If you unfilter the network requests, do you get the required requests?

Best regards,
Kevin Kim

Hi @kkim ,
for testing we have added license key inside the component, still resulted in same issue. there is no console errors as well. Have checked api calls but there is no api calls to webviewer.

We actually also tested to directly view a pdf file we added within the app. Still the same. The pdfviwer can be loaded in dev, but stage.

Hi there,

Thank you for your response,

Could you please try setting up the config file following this guide:

If the above does not work, please try the following

  • Clearing your cache
  • Reinstalling PDF.js Express package and making sure to properly replace all the static assets (delete the old ones and then reinstall)
  • Make sure you aren’t accidentally calling the constructor elsewhere
  • Make sure all the assets are being loaded correctly (check the network tab for any 404s)

If none of these fixes it, providing a link to this environment so I can test it myself would be helpful.

Best regards,
Kevin Kim

For loading dynamic data config file set up won’t help, right?

Hi there,

The subdomain needs to be the same domain as the one that is being hosted.
I realize that the original domain is archgroup.com
Could you please try switching the domain on your key from ‘archre.com’ to ‘archgroup.com’ to see if that resolves your issue?

Please also note that you currently have your domain registered as ‘www.archre.com’ This ‘www’ could be causing issues as you may also want it to work on resource pages as well (i.e. https://insurance.archgroup.com/ and https://mortgage.archgroup.com/)
So it is best if you also remove the www when adding your domain.

Best regards,
Kevin Kim

Hi there,

Have you tried switching the domain name to archgroup.com and see if that resolves your issue?

Best regards,
Kevin Kim

Hi there,

When you switched the domain to archre.com, did you get any different console errors/warnings? Could you please provide a screenshot along with the network requests?

Best regards,
Kevin Kim

Hi there,

Could you please provide your network requests and console messages for the staging environment?

Please note that the blob warning in localhost means that a non-pdf document was attempted to be opened.

Best regards,
Kevin Kim