Unable to make it compatiable with latest version of pdfjs-dist #1581
-
Before you start - checklist
DescriptionFailed to load pdf : UnknownErrorException: The API version "3.6.172" does not match the Worker version "3.9.179". Steps to reproduceload a pdf with similar version Expected behaviorAble to load pdf Actual behaviorNot able to load pdf Additional informationNo response Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
Anyone can please help with compatability issue of react-pdf and pdf-js in react project |
Beta Was this translation helpful? Give feedback.
-
If you have multiple pdfjs-dist versions in your app (I'd advise you not to), default ways of copying/including worker file won't work, because: When having one copy of pdfjs-dist, it will look like this:
When having multiple copies, it will look like this:
When importing
|
Beta Was this translation helpful? Give feedback.
If you have multiple pdfjs-dist versions in your app (I'd advise you not to), default ways of copying/including worker file won't work, because:
When having one copy of pdfjs-dist, it will look like this:
When having multiple copies, it will look like this:
When importing
pdfjs-dist
directly from your application, you'll import version 3.9, not 3.6.