PDF.js Express Version
8.0.0 / 8.1.0
Detailed description of issue
PDFJSDocumentType attempts a fetch with a url of type “file: //”. and fails (remember we are in Electron environment).
In web environment is all ok.
Expected behaviour
Webviewer load i18n translation.
Does your issue happen with every document, or just one?
Every time
Link to document
ND
Code snippet
Attached
system
October 4, 2021, 8:06pm
2
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:
Guides:
APIs:
Forums:
Logan
October 5, 2021, 9:28pm
3
Hey there,
Can you please share a code snippet showing how you are loading Express? What is your path
parameter set as?
Thanks,
Logan
Logan
October 6, 2021, 8:18pm
5
Hey there,
I am not too familiar with Electron so I don’t know how useful I will be here.
Can you try using a relative path like we do in our sample ?
Thanks,
Logan
Hi Logan, thanks for your reply.
No, the relative path is not the solution. The problem is PDFJSDocumentType try to get i18n json files with a Fetch API call. Fetch API can’t get file with file:// protocol. Here is any workaround for load i18n json in WebViewer manually?
P.s the problem is in v7 and v8, v6 not use Fetch api.
Logan
October 7, 2021, 4:10pm
7
Hey there!
I just found out we actually just merged a pull request that changes how these files are loaded. This will be pushed in the next release (which I will make next week). Keep an eye out in #announcements .
Thanks,
Logan
Thanks, i’ve solved with a upgraded version of Electron.
Now i’ve the same problem with cordova…i really think you need to change how these files are loaded
Thanks a lot!
Logan
October 7, 2021, 4:44pm
9
Yup! The incoming fix will fix Cordova as well (thats what the fix originally was for)
Logan
Ok Logan, if the new release solve the Cordova issue it will be nice
I attach a screen (label are not translated).
1 Like
Hi Logan, any update for the fixed release?
Logan
October 18, 2021, 7:45pm
12
Hey there,
We will be releasing this week. Just waiting for a couple more fixes to get through code review.
Thanks,
Logan