Warning: Setting up fake worker. How to render PDF from ArrayBuffer using react-pdf in Next.js app? #1688
Replies: 6 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
I tried the copy "worker.min.js" to the public folder, but my
However, then in the browser I get:
So I need to perhaps compile it? What should I do now? |
Beta Was this translation helpful? Give feedback.
-
Yea I am getting this same issue right now. My guess is it's something that Next.js did... |
Beta Was this translation helpful? Give feedback.
-
I had a similar issue. Fix for me was using Next 13 instead of 14. |
Beta Was this translation helpful? Give feedback.
-
bumping this issue- experiencing the same problem using Next 14 |
Beta Was this translation helpful? Give feedback.
-
спасибо огромное всем! 2 дня искал решение проблемы, перешел на next 13 - все заработало |
Beta Was this translation helpful? Give feedback.
-
I am getting these error messages in the chrome dev tools logs, when rendering the PDF
<Document>
in my simple Next.js app:It looks like I need to setup the worker somehow? Did I miss that in the docs (looks like so)? I am successfully receiving an ArrayBuffer after doing
fetch(apiPath)
to generate a PDF from LaTeX using thepdflatex
CLI (and I have verified the PDF is renderable by checking the PDF manually), but it's not working. Here is my UI code:And here is my API route to generate the PDF, if that helps:
And the utility:
Any suggestions or ideas on why my PDF is not rendering now, and just saying this where the
<Document />
was rendered?Beta Was this translation helpful? Give feedback.
All reactions