Skip to content

Fatal crash calling page.getPixmap() with certain pdf file pages #605

Closed
@derwyddon

Description

@derwyddon

Please provide all mandatory information!
In some pages of certain pdf files the getPixmap crashes without showing any nformatio.

You could use these files from the IMF:
https://www.imf.org/~/media/Websites/IMF/imported-flagship-issues/external/pubs/ft/weo/2013/01/pdf/_c1pdf.ashx
https://www.imf.org/~/media/Websites/IMF/imported-flagship-issues/external/pubs/ft/weo/2013/01/pdf/_c3pdf.ashx

to reproduce the crash

Describe the bug (mandatory)

The _c1pdf.pdf file crashes when processig page 1 and the _c3pdf.pdf file crashes processing page 2 (starting from page 0).

To Reproduce (mandatory)

Step 1) Open the file with fitz.open
Step 2) Using a bucle to call getPixmap for every doc Page
Step 2.a) The specific parameters used where mat = fitz.Matrix(2.0, 2.0) and alpha=False, but the getPixmap crashes even with the default parrameters: getPixmap() and not only with getPixmap(mat,alpha=False)

Expected behavior (optional)

Getting the pixmap or a Exception

Your configuration (mandatory)

  • Windows 10 64bit v1809
  • Python v3.6.3
  • PyMuPDF v1.17.5

The output of print(sys.version, "\n", sys.platform, "\n", fitz.__doc__) :
3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)]
win32

PyMuPDF 1.17.5: Python bindings for the MuPDF 1.17.0 library.
Version date: 2020-08-06 06:31:06.
Built for Python 3.6 on win32 (64-bit).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions