JPEG2000 images with unsupported COD options in PDFs not being shown in Firefox viewer
Categories
(Firefox :: PDF Viewer, defect)
Tracking
()
People
(Reporter: janreggie.delacruz, Unassigned)
References
Details
(Whiteboard: [pdfjs-image-jpx])
Attachments
(5 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
- Go to this Wikimedia Commons page: https://commons.wikimedia.org/wiki/File:Vida_y_escritos_del_Dr._Jos%C3%A9_Rizal,_por_Wenceslao_Retana.pdf
- Select "Original file", causing Firefox to load said PDF
- Went to page 7 and page 563
Actual results:
In page 7, there is a blank space below RESPECTIVAMENTE.
In page 563, nearly the entire page is blank, save some text on the right side, which serves as the caption for the "hidden" image.
Expected results:
In page 7, there should be an image below RESPECTIVAMENTE, displaying the logo of the printing press.
In page 563, there should be an image of a bill and a stamp.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Hi Jan,
thank you for taking the time to submit this bug report.
I was able to reproduce on Windows 10, on Firefox Nightly 94.0a1 (2021-09-20) (64-bit) version and Release 92.0 (64-bit) version, as described in actual results. Based on this I will mark each respective flag as affected and set the severity.
I let the component in order to get the dev team involved, but if it's not relevant,
'Firefox-PDF Viewer' team, please feel free to change the component if this is not the appropriate one.
Jerónimo.
Comment 3•3 years ago
|
||
Change the status for beta to have the same as nightly and release.
For more information, please visit auto_nag documentation.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0
I can confirm this bug with the nightly build.
It seems to be a problem with the embedded JPX image.
The console out put shows:
"Warning: Invalid absolute docBaseUrl: "file:///C:/Users/USER/Downloads/Vida_y_escritos_del_Dr._Jos%C3%A9_Rizal,_por_Wenceslao_Retana-2.pdf". pdf.worker.js:1115:13
PDF 63bc83946486db9b0effc08a20df93b9 [1.4 itext-paulo-155 (itextpdf.sf.net-lowagie.com) / pdftk-java 3.0.9] (PDF.js: 2.12.126) viewer.js:1502:13
Warning: JPX: Unsupported COD options (resetContextProbabilities, terminationOnEachCodingPass, verticallyStripe, predictableTermination). pdf.worker.js:1115:13
Warning: Unable to decode image "img_p6_2": "JpxError: JPX error: JPX error: Out of packets". pdf.worker.js:1115:13
Warning: Dependent image isn't ready yet pdf.js:925:13"
Comment 5•3 years ago
|
||
These COD options aren't supported:
https://github.com/mozilla/pdf.js/blob/de7cfed9e392eb3bfcb761ccea2c1f09cdf869aa/src/core/jpx.js#L337-L355
:jrmuizel, do you know someone who could help to implement that stuff ?
Comment 6•3 years ago
|
||
Comment 7•3 years ago
|
||
Comment 8•3 years ago
|
||
Calixte, I don't really know anyone who's familiar with jpeg2000 to suggest. If it's important we could come up with someone though. Perhaps one of the Outreachy people would be an option?
I implemented one of the easy options for fun. Maybe I'd look at the others when some free time shows up.
Comment 9•3 years ago
|
||
terminationOnEachCodingPass is probably a good one to implement next
Updated•3 years ago
|
Comment 10•3 years ago
|
||
:jrmuizel, would you mind to make a PR with your patch in pdf.js repo ?
Comment 11•3 years ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #10)
:jrmuizel, would you mind to make a PR with your patch in pdf.js repo ?
Needinfo for the above question ^
Updated•3 years ago
|
Updated•3 years ago
|
Comment 12•3 years ago
|
||
Comment 14•3 years ago
|
||
Updated•2 years ago
|
Description
•