mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.26k stars 9.96k forks source link

ReferenceError: XMLHttpRequest is not defined #7080

Closed raineroviir closed 8 years ago

raineroviir commented 8 years ago

I'm getting this error when trying to load my PDF.
Error: ReferenceError: XMLHttpRequest is not defined

yurydelendik commented 8 years ago

Please provide more information as requested at https://github.com/mozilla/pdf.js/blob/master/CONTRIBUTING.md . As is the issue will be closed as incomplete.

raineroviir commented 8 years ago

I solved the problem looking at the node.js example: the PDFJS.getDocument() API needs a Uint8Array stream not the local file path.