You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to preview a PDF file over 2GB in Chrome 131.0.6778.205 using PDF.js(v4.5.136). Even though I am using chunked loading, I still get an Array buffer allocation failed exception.
For PDF files smaller than 2GB, this exception does not occur, and I also confirmed in the network that there are response with code 206.
After debugging, I found that in the src/core/chunked_stream.js constructor, a new Uint8Array(length) is used, where length corresponds to the size of my PDF file, 2456564609. I modified it to new ArrayBuffer(length, { maxByteLength: length }) and it worked. I want to know if this is by design or due to some other reason.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to preview a PDF file over 2GB in Chrome 131.0.6778.205 using PDF.js(v4.5.136). Even though I am using chunked loading, I still get an Array buffer allocation failed exception.
For PDF files smaller than 2GB, this exception does not occur, and I also confirmed in the network that there are response with code 206.
After debugging, I found that in the
src/core/chunked_stream.js
constructor, anew Uint8Array(length)
is used, where length corresponds to the size of my PDF file, 2456564609. I modified it tonew ArrayBuffer(length, { maxByteLength: length })
and it worked. I want to know if this is by design or due to some other reason.Beta Was this translation helpful? Give feedback.
All reactions