Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PDF: error when packaged using Electron #238

Open
warpdesign opened this issue Apr 17, 2024 · 2 comments
Open

PDF: error when packaged using Electron #238

warpdesign opened this issue Apr 17, 2024 · 2 comments

Comments

@warpdesign
Copy link

warpdesign commented Apr 17, 2024

I am attempting to use react-doc-viewer with an Electron application. When trying to view a pdf document, it fails and I see this warning in the console:

tiny-warning.esm.js:11 Warning: Error: Setting up fake worker failed: "Cannot load script at: file://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js".

Is there a way to not rely on external url for the pdf worker? There is no way my app will download random some js from an external url (and it does even require an internet connection).

I saw this issue but it has been closed without much explanation.

@cyntler
Copy link
Owner

cyntler commented May 12, 2024

@phosha
Copy link

phosha commented Jun 30, 2024

@warpdesign Try to use the latest version: https://github.com/cyntler/react-doc-viewer/releases/tag/v1.15.0

I'm trying to use the latest version (1.16.5), but it's still using external urls, maybe I'm doing something wrong?
изображение

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants