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

PyMuPDF Pro 1.25.0: Some graphical elements of a .docx file not visible with get_pixmap() #4158

Open
trianxy opened this issue Dec 17, 2024 · 0 comments

Comments

@trianxy
Copy link

trianxy commented Dec 17, 2024

Description of the bug

At a .docx file, PyMuPDF Pro did not display certain graphical purple elements:

With PyMuPDF Pro:
image

With Google Docs or Mac's Pages app:
image

How to reproduce the bug

Download attached pink-elements-inside-image1-not-shown.docx and run

from PIL import Image
import io, os
import pymupdf.pro
pymupdf.pro.unlock()  # add trial key for more than 3 pages

document = pymupdf.open("pink-elements-inside-image1-not-shown.docx")

image_bytes = document.load_page(0).get_pixmap().tobytes(output="png")
img = Image.open(io.BytesIO(image_bytes))
img.save("tmp.png")

and open tmp.png to observe that the pink graphical elements are omitted (while they are shown if you open the document with other software like Google Docs or Mac's Pages)

PyMuPDF version

1.25.0

Operating system

Linux

Python version

3.9

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

No branches or pull requests

1 participant