Answers for "file origin does not match viewer's pdf.js"

1

file origin does not match viewer's pdf.js

1. If you're trying to do a crossorigin load you must add your origin in the array
var HOSTED_VIEWER_ORIGINS = ['null', '...', 'yourorigin'];
2. check the protocol from the origin you are getting the resource.
example: 
http://localhost/web/viewer.html?file=https://localhost/xx.pdf
turns into
http://localhost/web/viewer.html?file=http://localhost/xx.pdf
Posted by: Guest on July-13-2020

Code answers related to "file origin does not match viewer's pdf.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language