Hello, we have received a pdf, part of which is unreadable via pdfjsexpress.
It seems similar to Color elements not displayed, breaking whole PDF file (TypeError: codingStyleParameters is undefined etc.) · Issue #12752 · mozilla/pdf.js · GitHub.
Here’s the document on adobe acrobat:
And here it is on pdfjs express in the demo:
The console will print the following:
Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented
pdf.worker.js:129
Warning: Unable to decode image: TypeError: Cannot read properties of undefined (reading ‘decompositionLevelsCount’)
pdf.worker.js:129
Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented
pdf.worker.js:129
Warning: Unable to decode image: TypeError: Cannot read properties of undefined (reading ‘decompositionLevelsCount’)
pdf.worker.js:129
Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented
pdf.worker.js:129 Warning: Unable to decode image: TypeError: Cannot read properties of undefined (reading ‘decompositionLevelsCount’)
pdf.worker.js:129
Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented
pdf.worker.js:129
Warning: Unable to decode image: TypeError: Cannot read properties of undefined (reading ‘decompositionLevelsCount’)
Here’s the faulty pdf: document_old.pdf (100.4 KB)
Also, I’d like to know if it is possible to be notified if the pdf cannot be displayed properly via an event or a method call to display a message to the end user of our application