bower install pdfjs-dist
<script src="bower_components/pdfjs-dist/build/pdf.js"></script>
<script src="bower_components/pdfjs-dist/build/pdf.worker.js"></script>
Uncaught TypeError: Cannot read property 'PDFJS' of undefined
at Object.defineProperty.value (pdf.js:14288)
at __w_pdfjs_require__ (pdf.js:45)
at Object._typeof (pdf.js:8065)
at __w_pdfjs_require__ (pdf.js:45)
at Object.defineProperty.value (pdf.js:88)
at pdf.js:91
at webpackUniversalModuleDefinition (pdf.js:24)
at pdf.js:25
Don't add pdf.worker.js as a script, it's loaded by web worker. Closing as incomplete - no details provided.
Well, i have same problem here:
--> bower install pdfjs-dist
and when i use require on this pdf, i obtain undefined. why?
TypeError: Cannot read property 'getDocument' of undefined
Most helpful comment
Don't add pdf.worker.js as a script, it's loaded by web worker. Closing as incomplete - no details provided.