Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Unable to open some PDFs #10867

Closed
LaurenWags opened this issue Sep 8, 2017 · 4 comments
Closed

Unable to open some PDFs #10867

LaurenWags opened this issue Sep 8, 2017 · 4 comments

Comments

@LaurenWags
Copy link
Member

LaurenWags commented Sep 8, 2017

Test plan

  1. Go to about:preferences#extensions and verify you are on PDF.js version 1.9.457
  2. Navigate to http://www.mckinsey.com/business-functions/mckinsey-analytics/our-insights/how-artificial-intelligence-can-deliver-real-value-to-companies?utm_content=buffer64f12&utm_medium=social&utm_source=linkedin.com&utm_campaign=buffer
  3. Locate the 'Full Report (PDF ~3MB)' button (near the top)
  4. Click on the button.

@LaurenWags LaurenWags added the bug label Sep 8, 2017
@LaurenWags LaurenWags added this to the 0.20.x (Developer Channel) milestone Sep 8, 2017
@LaurenWags
Copy link
Member Author

Other PDFs (http://www.orimi.com/pdf-test.pdf or navigate to https://basicattentiontoken.org/faq/#meaning and click Download the Whitepaper) display without issue.

@luixxiul
Copy link
Contributor

luixxiul commented Sep 9, 2017

Reproduced:

pdf.worker.js:342 Uncaught (in promise) Error: Bad end offset: 5510192
    at error (pdf.worker.js:342)
    at assert (pdf.worker.js:353)
    at ChunkedStream_onReceiveData [as onReceiveData] (pdf.worker.js:15019)
    at ChunkedStreamManager_onReceiveData [as onReceiveData] (pdf.worker.js:15361)
    at ChunkedStreamManager.<anonymous> (pdf.worker.js:15240)
    at <anonymous>

@diracdeltas
Copy link
Member

diracdeltas commented Sep 12, 2017

I believe this is an issue in https://github.com/mozilla/pdf.js because the problem also occurs in Chrome with the pdf.js extension (version 1.8.557)

firefox offers to download the file instead of opening it

diracdeltas added a commit to brave/pdf.js that referenced this issue Sep 12, 2017
This appears to fix the 'Bad end offset errors' when loading some PDFs.
See mozilla#7616
Fix brave/browser-laptop#10867
@diracdeltas
Copy link
Member

found a way to fix it in brave/pdf.js#3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.