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

Color elements not displayed, breaking whole PDF file (TypeError: codingStyleParameters is undefined etc.) #12752

Closed
rugk opened this issue Dec 18, 2020 · 2 comments · Fixed by #12753

Comments

@rugk
Copy link

rugk commented Dec 18, 2020

Attach (recommended) or Link to PDF file here:

Configuration:

  • Web browser and its version: Firefox 83
  • Operating system and its version: Linux/Gnome/Fedora 33
  • PDF.js version: I have no idea, but reproducible with the current version on your website
  • Is a browser extension: No???

Steps to reproduce the problem:

  1. Go to this link.
  2. Optionally, download PDF file and open it in Firefox.
  3. Optionally, go to https://mozilla.github.io/pdf.js/web/viewer.html and open it there.

What is the expected behavior?

If I open it in Evince 3.38.0 it actually works and is shown in color:
grafik

What went wrong?

Everything:

grafik

The following console errors are shown:

In Firefox 83 (stable):

14:36:48.397 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1104:13
14:36:48.398 Warning: Unable to decode image "img_p0_1": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1104:13
14:36:48.400 PDF f2429f9760ebdfea04bae9a312813109 [1.5 RICOH MP C5504 / RICOH MP C5504] (PDF.js: 2.7.99) viewer.js:1351:13
14:36:48.400 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1104:13
14:36:48.400 Warning: Unable to decode image "img_p0_2": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1104:13
14:36:48.523 Warning: Dependent image isn't ready yet 2 pdf.js:1190:13
14:36:48.659 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1104:13
14:36:48.659 Warning: Unable to decode image "img_p1_1": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1104:13
14:36:48.660 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1104:13
14:36:48.661 Warning: Unable to decode image "img_p1_2": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1104:13
14:36:48.773 Warning: Dependent image isn't ready yet 2 pdf.js:1190:13

On https://mozilla.github.io/pdf.js/web/viewer.html:

14:37:20.206 PDF 110dd61fd57444010b1ab5ff38782f0f [1.4 pdfeTeX-1.21a / TeX] (PDF.js: 2.7.395) app.js:1672:4
14:37:28.352 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1067:13
14:37:28.353 Warning: Unable to decode image "img_p0_1": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1067:13
14:37:28.355 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1067:13
14:37:28.355 Warning: Unable to decode image "img_p0_2": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1067:13
14:37:28.359 PDF f2429f9760ebdfea04bae9a312813109 [1.5 RICOH MP C5504 / RICOH MP C5504] (PDF.js: 2.7.395) app.js:1672:4
14:37:28.473 Warning: Dependent image isn't ready yet 2 util.js:358:4
14:37:28.604 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1067:13
14:37:28.604 Warning: Unable to decode image "img_p1_1": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1067:13
14:37:28.608 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1067:13
14:37:28.608 Warning: Unable to decode image "img_p1_2": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1067:13
14:37:28.722 Warning: Dependent image isn't ready yet 2 util.js:358:4
14:37:31.893 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1067:13
14:37:31.894 Warning: Unable to decode image "img_p2_1": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1067:13
14:37:31.895 Warning: JPX: Trying to recover from: Codestream code 0xFF53 (COC) is not implemented pdf.worker.js:1067:13
14:37:31.895 Warning: Unable to decode image "img_p2_2": "TypeError: codingStyleParameters is undefined". pdf.worker.js:1067:13
14:37:32.023 Warning: Dependent image isn't ready yet 2 util.js:358:4

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

As said, in all version of PDF.js that are used I see an error, this includes:

  • the platform FragDenStaat, where I saw the FOI request reply PDF the first time. See this link, it uses PDF.js. (downstream issue)
  • the stable version of Firefox (v83) on Linux
  • your website, as explained above.
@timvandermeij
Copy link
Contributor

Fixed by the PR above.

@rugk
Copy link
Author

rugk commented Dec 18, 2020

Wow, that was fast. Thanks a lot! 😃 🎉

Happy weekend and happy holidays! /cc @Snuffleupagus

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