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

JBIG2 text segments with reference corner on the right do not render correctly #17871

Closed
nico opened this issue Apr 3, 2024 · 1 comment · Fixed by #17875
Closed

JBIG2 text segments with reference corner on the right do not render correctly #17871

nico opened this issue Apr 3, 2024 · 1 comment · Fixed by #17875

Comments

@nico
Copy link

nico commented Apr 3, 2024

Attach (recommended) or Link to PDF file here:

symbol-bottomleft.pdf
symbol-topright.pdf
symbol-bottomright.pdf

Configuration:

  • Web browser and its version: Firefox 124.0.2
  • Operating system and its version: macOS 13.5.2
  • PDF.js version: Whatever ships with that Firefox
  • Is a browser extension: Whatever is the default Firefox setup

Steps to reproduce the problem:

  1. Open each of the three PDFs above

What is the expected behavior? (add screenshot)

image

The should all look identical, like symbol-bottomleft.pdf looks in Firefox, and like all three look in Chrome. mutool extract (which I believe uses jbig2dec for jbig2 decoding) also produces output like Chrome for all three (…albeit with an unrelated warning).

What went wrong? (add screenshot)

The two with the reference corner on the right look compressed in the x direction:

image

(I made these files myself while writing a JBIG2 decoder. I'm reasonably confident that the files and Chrome and jbig2dec and my decoder are correct, but it's possible the files are wrong instead.)

@nico
Copy link
Author

nico commented Apr 3, 2024

Thanks for the quick fix! I verified that these PDFs all work well in https://mozilla.github.io/pdf.js/web/viewer.html now.

I opened #17883 for the same PDFs with the transpose flag set (and coordinates appropriately adjusted) still having a few issues.

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

Successfully merging a pull request may close this issue.

2 participants