Closed newproplus closed 6 months ago
Nowhere in the documentation I'm suggesting to use workerPort. I think it might fail to load the worker and cause the issue you're seeing. Why did you choose to use it?
Actually, I use pdfjs.GlobalWorkerOptions.workerSrc = '/worker/pdf.worker.min.js'
at first, but it shows an error "Uncaught SyntaxError: Unexpected token 'export'", source: http://192.168.1.123:1420/worker/pdf.worker.min.mjs (21)
And now I found that because the worker version and API version are different.
After I change the worker's version, it works.
Before you start - checklist
Description
I use a worker file on my server, but when I open a PDF file, the component always shows "Loading PDF..."
Steps to reproduce
I use a base64 string, and I tried use
file={{ data: base64 }}
orfile={base64}
, it doesn't work. My code like:Expected behavior
Render PDF file.
Actual behavior
Always shows "Loading PDF..."
Additional information
No response
Environment