mozilla/pdf.js — Issue #1231: Cannot Draw without setting flag PDFJS.disableWorker = true
Author: alexhaefner
Created: 2012-02-16 20:04:46+00:00
State: open

Hey,

I am serving pdfs using the Hello World example but with a differnet url. The only header for the return data I have set to content-type: application/pdf. If I don't set PDFJS.disableWorker = true, I cannot draw the pdf and will get the error in console:

[14:52:09.932] Error: No PDFJS.workerSrc specified @ http://localhost:8001/static/javascript/pdf.js?v=88596:863
[14:52:09.939] PDFDoc([object ArrayBuffer])@http://localhost:8001/static/javascript/pdf.js?v=88596:638
getPdfOject([object ArrayBuffer])@http://localhost:8001/static/javascript/homepage_templates.js?v=aed81:683
getPdfOnreadystatechange([object Event])@http://localhost:8001/static/javascript/pdf.js?v=88596:64
@ http://localhost:8001/static/javascript/pdf.js?v=88596:863
[14:52:10.145] No PDFJS.workerSrc specified @ http://localhost:8001/static/javascript/pdf.js?v=88596:884

If I do set the flag, everything will work.
I installed the developer addon, and can load the files directly from their URLs and that works without a problem, it's just when I try to render the PDF within the application.

Thanks,
Alex