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

PeterNerlich picture PeterNerlich  路  3Comments

BrennanDuffey picture BrennanDuffey  路  3Comments

xingxiaoyiyio picture xingxiaoyiyio  路  3Comments

anggikolo11 picture anggikolo11  路  3Comments

azetutu picture azetutu  路  4Comments