-
After placing the example code in the README in a component inside of a create-react-app, the page renders with the following series of warnings and error messages: here is my code: and here is my file layout: The pdf I am using is the one the create-react-app-5 example, which loads properly in firefox. Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
found the issue: |
Beta Was this translation helpful? Give feedback.
found the issue:
the way I specify the link to the pdf in the public folder doesn't really work for react-pdf.
I got it to work by using
file={process.env.PUBLIC_URL + "/sample.pdf"}
instead.If this is intended behavior, it is very odd.