Pdf.js: bower Cannot read property 'PDFJS' of undefined

Created on 25 Oct 2017  ·  3Comments  ·  Source: mozilla/pdf.js

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

Most helpful comment

Don't add pdf.worker.js as a script, it's loaded by web worker. Closing as incomplete - no details provided.

All 3 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

THausherr picture THausherr  ·  3Comments

azetutu picture azetutu  ·  4Comments

AlexP3 picture AlexP3  ·  3Comments

zerr0s picture zerr0s  ·  3Comments

patelsumit5192 picture patelsumit5192  ·  3Comments