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

MuPDF error: format error: negative code in 1d faxd #4224

Open
uwohlfeil opened this issue Jan 14, 2025 · 3 comments
Open

MuPDF error: format error: negative code in 1d faxd #4224

uwohlfeil opened this issue Jan 14, 2025 · 3 comments
Labels
upstream bug bug outside this package

Comments

@uwohlfeil
Copy link

Description of the bug

Dear PyMuPdf team,

we have found a PDF file that generates an error when I try to convert its pages to an image.
I have also tested the javascript variant of this library (mupdf.js) which produces the same error.

I test this document with other tools like Ghostscript, ImageMagik or pdftoppm and also PDF viewers like pdf.js.
All of them were able to render this PDF without any errors.

Can you please investigate this problem?

I attached the document here:
Testdokument-Scan-bw-OCR.pdf

How to reproduce the bug

import pymupdf

doc=pymupdf.open("Testdokument-Scan-bw-OCR.pdf")

for p in doc.pages():
pix = p.get_pixmap(dpi=150)
pix.save("t-%s.png" % p.number)
pix = None
doc.close()

PyMuPDF version

1.25.1

Operating system

Linux

Python version

3.12

@JorjMcKie
Copy link
Collaborator

This is an upstream error. I am going to file an issue in MuPDF's system and insert a link here.

@JorjMcKie JorjMcKie added the upstream bug bug outside this package label Jan 14, 2025
@JorjMcKie
Copy link
Collaborator

MuPDF issue link: https://bugs.ghostscript.com/show_bug.cgi?id=708254

@uwohlfeil
Copy link
Author

I also checked the following versions:

  • 1.24.14 same error
  • 1.23.26 No direct error message, but the result is a black png with a small white line on the top
  • 1.22.5 No direct error message, but the result is a black png with a small white line on the top
  • 1.21.1 No direct error message, but the result is a black png with a small white line on the top

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

No branches or pull requests

2 participants