PDF.js Express Viewer
UI & Core 8.2.0
The viewer is working with Version UI 8.1.0 / Core 8.1.1 without any errors.
When updating to version 8.2.0 the console outputs “PDFJS.express: A valid license key is required to use the view only build of PDF.js Express.”. I tried generating a new key but it didn’t help.
Hello, I’m Ron, an automated tech support bot
While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:
After some investigating I believe that the modules that Express loads to validate your license key are not getting loaded properly.
When you upgraded to 8.2, did you delete the existing assets and replace them with the new 8.2 assets?
Check out the “Copy static assets” section here - Integrating PDF.js Express Plus with NPM | Documentation. I would try redoing this process but making sure the old assets are deleted first.
If things still don’t work after this please let me know!
I copied the new library alongside the other library folder. There shouldn’t be a problem. And my browser cache is disabled.
The link you provided is the plus version which is working without problems. I only need the viewer for our project. With the plus version i get the watermark and lot of functions we don’t need.
I tried the NPM and also the manual integration method for the viewer version. Both have the same problem with verifying the key.
Looking at the sample you sent, I can confirm that the modules have not been updated properly, or are not being served properly by your server. The key you are using is valid and the authentication server is handling it properly.
I would recommend putting the assets in a entirely new folder. We actually recommend keeping a versioned folder system, where the assets you copy are in a brand new folder. Right now your assets are stored at
...pdfjsexpress/public/core/pdfjs/ - I recommend changing this to
pdfjsexpress/public/core/pdfjs/8.2.0/ and changing that path every time you upgrade. This helps prevent caching issues on both server and client.
Hm… That didn’t solve the problem.
I did another example on a different server and get the same result: PDF.js Express Test
Got a new key for “101.at” or do i have to include the subdomain?
Could there be a build error in the latest release? I tried the code via NPM and also the zip under “manual integration”. The example on your website is still using core version 8.1.
It looks like the WASM module we use is being served with an incorrect content type.
On your servers the WASM module content is mangled:
But it should look like so:
Please make sure your server is set up to properly serve WASM modules.
I can also confirm that there is no build issue with 8.2.0. I am testing your license key on my own server and everything is working fine.
Thank you for you kind assistance! The mime type is set on both servers and now the file gets served correctly. I still get the same messages.
I have to give it another try next week when i am back at work.
i also have this issue. 8.1 works fine
I just pushed viewer 8.2.1 which should fix your issues.
Let me know if you still have issues.
Super! 8.2.1 is working fine!