Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500MB+ PDF crashes PDF.js in Chrome #6802

Closed
Rob--W opened this issue Dec 24, 2015 · 1 comment
Closed

500MB+ PDF crashes PDF.js in Chrome #6802

Rob--W opened this issue Dec 24, 2015 · 1 comment

Comments

@Rob--W
Copy link
Member

Rob--W commented Dec 24, 2015

Feedback from the Chrome web store:

https://hdl.handle.net/10462/eadarc/1525 If you try to load the PDF at the above location by clicking the PDF icon next to "View Options" it loads most of the way and then comes back with "Aww, Snap!" The built in Chrome PDF plugin handles it fine, but it can't search inside the PDF when it's in its own frame whereas your extension can. Do you have any ideas?

I debugged it a little bit. That particular PDF file (http://bishop.slq.qld.gov.au/webclient/StreamGate?folder_id=0&dvs=1450995369427~57) has 568484947 bytes of data (542 MB). Chrome kills the tab around 512 MB due to a memory allocation failure (only for XMLHttpRequest with type arraybuffer, with a size that exceeds 512MB). It seems that resonseType = 'blob' doesn't cause a crash.

Maybe it's time to add a special path for big PDF files? E.g.:

(fetch seems ideal, but it has some disadvantages as I explained in #6126 (comment))

@timvandermeij
Copy link
Contributor

Closing since the fetch API is implemented now and the file is no longer available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants