Skip to content

Cannot Load PDF using example code in README #1741

Answered by andrewyur
andrewyur asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andrewyur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant