Pdfjs Plugin - unexpected server response

Hi everybody,

i use Ubuntu server 10 and i have installed pdfjs in order to use it in my Omeka-2.1.4 pages. I have placed Omeka and pdfjs files under var/www/ . In the 'src' parameter (which is in show.php) i use the following value: http://mozilla.github.com/pdf.js/web/viewer.html?file=http://localhost/omeka-2.1.4/files/original/'.metadata($file,'filename').'

I face the following error:
PDF.js v1.0.770 (build: 74d02c3)
Message: Unexpected server response (0) while retrieving PDF "http://localhost/omeka-2.1.4/files/original/d004d56cfa4da0769fbae6fa6a64fdb9.pdf".

What could be wrong? Is it the path?

Thank you in advance!

It looks like you're using the viewer that's hosted on the pdf.js Github in your URL. That page won't be able to load PDFs from your server. Your link should point to your local copy of the viewer, not one hosted by someone else online.

Thank you very much for your answer John!
That was the problem. The source value didn't need this: "http://mozilla.github.com/pdf.js/web/viewer.html?file=", before the actual path of my server.

If you omit that entire thing, you're just embedding the PDF itself in an iframe. That will work as long as the browser can display PDFs (Firefox and Chrome can out-of-the-box, and IE can with Adobe Reader installed), but you're not actually using PDF.js in that case.