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

getPixmap() call fails in version 1.18.9 #941

Closed
abarker opened this issue Mar 10, 2021 · 2 comments
Closed

getPixmap() call fails in version 1.18.9 #941

abarker opened this issue Mar 10, 2021 · 2 comments
Assignees
Labels

Comments

@abarker
Copy link

abarker commented Mar 10, 2021

Please provide all mandatory information!

Describe the bug (mandatory)

getPixmap() call fails in version 1.18.9 but works in 1.18.8

To Reproduce (mandatory)

import sys, fitz
print("fitz version:", fitz.VersionBind)

document = fitz.open(sys.argv[1])
page_display_list = document[0].getDisplayList()
pixmap = page_display_list.getPixmap()

document.close()

This code works with version 1.18.8 but running with 1.18.9 installed
gives the following error:

fitz version: 1.18.9
Traceback (most recent call last):
  File "fail_pymupdf.py", line 13, in <module>
    pixmap = page_display_list.getPixmap()
AttributeError: 'DisplayList' object has no attribute 'getPixmap'

Your configuration (mandatory)

  • Operating system, potentially version and bitness: Ubuntu 20.04, 64-bit, and I also got a bug report from a user running on Windows.
  • Python version, bitness: 3.8.5, 64-bit.
  • PyMuPDF version, installation method (wheel or generated from source): 1.18.9, wheel.
@JorjMcKie
Copy link
Collaborator

I forgot to include alias definitions for the old method names.
Will be corrected in next version.
If you use DisplayList.get_pixmap() and DisplayList.get_textpage() things should work.

@JorjMcKie
Copy link
Collaborator

fixed in just published v1.18.10

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

No branches or pull requests

2 participants