Replies: 3 comments 4 replies
-
|
This setting loads the correct file: pdfDefaultOptions.workerSrc = () => 'https://unpkg.com/browse/ngx-extended-pdf-viewer@10.0.0-alpha.9/assets/pdf.worker-2.10.550.min.js';Unfortunately, it doesn't work because UNPKG sets the wrong MIME type, but that's another topic. |
Beta Was this translation helpful? Give feedback.
-
pdfDefaultOptions.assetsFolder = 'https://unpkg.com/browse/ngx-extended-pdf-viewer@10.0.0-alpha.9/assets';also seems to work (apart from the error I've mentioned above, which may be caused by my strict origin policy). |
Beta Was this translation helpful? Give feedback.
-
|
I can only guess, but I reckon your bug happens in this line: workerSrc = PDFWorkerUtil.createCDNWrapper(
new URL(workerSrc, window.location).href // <<<
);Please add the parameter |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We use our own CDN and uses the pdfviewer in different applications. When I set the assets folder to the http url of where we host the pdfjs folder it is not working because it keeps putting the current application url before the real assets folder url. Is there a way to set the assets folder with a http url?
Where pdfjsurl is something like http://mydomain/web/assets/pdfjs
I already tried setting the workersrc and the cmapurl

But then I get a 404 on pdf-2.10.544.min.js due to the incorrect url. (pointing to the current application and concat the cdn url isntead of just use the cdn url)
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions