mozilla / pdf.js

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

LinkAnnotation stops PDF Rendering #5700

Closed cmoscardi closed 9 years ago

cmoscardi commented 9 years ago

Hi, Hopefully this isn't outdated/irrelevant/etc... In a specific PDF file, I found a bug that raises an error and prevents the entire PDF from rendering.

If it matters, I was using viewerjs.

JS FILE: pdf.worker.js FUNCTION: addDefaultProtocoltoUrl() Error: cannot call indexOf : undefined is not a function

My fix: check that the url exists. if ( url && url.indexOf ...)

Let me know if you need further information, I did the minimal amount of work to get the file rendering.

Thanks!

cmoscardi commented 9 years ago

Sorry - looks like viewerJS' code is dated, and I didn't think to check your master until just now. Sorry for the spam!