http://www.boarddocs.com/ny/pobcsd/Board.nsf/files/ADDNFU5FC4AB/$file/Smart%20Schools%20Investment%20Plan%20PresentationSeptember%207%20%202016%20v3.pdf
Configuration:
The above PDF opens properly in Firefox 48.0.2 on the same computer, decently fast. However, when loading it in the Chrome extension, the loading bar on top fills and a blank screen is shown (see screenshot). Console shows the following:
pdf.worker.js:2311 Error: Bad end offset: 3465432
pdf.worker.js:2312 at error (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:2312:17)
at assert (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:2327:5)
at Object.ChunkedStream_onReceiveData [as onReceiveData] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:6069:7)
at Object.ChunkedStreamManager_onReceiveData [as onReceiveData] (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:6478:21)
at Object.<anonymous> (chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/content/build/pdf.worker.js:6331:14)
@Rob--W Are you able to reproduce this? I don't see how this would be different in the Chrome extension, unless it's fixed recently and not yet included in the release.
Update - check to see if the URL has to do with it. I downloaded the file and uploaded it to a different location, and it opened. But that could also have to do with different server, etc.
It might be that the server is not serving the file properly. I wonder why that only affects Chrome then.
@szheng95 it's related to how caching is working. if you disable caching in chome the extension will load the URL in the description. We had similar problems in the past, see https://github.com/mozilla/pdf.js/issues/5512 (but now I think it returns 200 instead of 206 for tail request)
@yurydelendik Yes, disabling caching is working, but obviously doing so for the entire browser is not a practical workaround. Is there a way to disable caching only for pdf.js? I seem to be running into this problem more and more lately, though that may just be a function of the sites I'm frequenting.
Same problem. Any solutions?
Workaround: add 59 and 60 chrome version to condition in web/compatibility.js line 34:
var isChromeWithRangeBug = /Chrome\/(39|40|59|60)\./.test(userAgent);
@ksn135 There is a "Disable range requests" option - try toggling it.
@szheng95 Thanks!
I'm also seeing this error with the latest chrome extension release when I try to open http://www.mckinsey.com/~/media/McKinsey/Industries/Advanced%20Electronics/Our%20Insights/How%20artificial%20intelligence%20can%20deliver%20real%20value%20to%20companies/MGI-Artificial-Intelligence-Discussion-paper.ashx. In Firefox, the PDF prompts for download instead of opening in the PDF viewer.
UPDATE: confirmed that disabling range requests seems to fix it - thanks!
How i can disable the "range request", whats is that?? a command?? a code on a js?? how??
This looks like a duplicate of issue #9544, which according to https://github.com/mozilla/pdf.js/issues/9544#issuecomment-374176371 was a (now fixed) upstream bug in Google Chrome.
Most helpful comment
@ksn135 There is a "Disable range requests" option - try toggling it.