PyMuPDF
PyMuPDF copied to clipboard
PyMuPDF Pro 1.25.0: Some graphical elements of a `.docx` file not visible with `get_pixmap()`
Description of the bug
At a .docx file, PyMuPDF Pro did not display certain graphical purple elements:
With PyMuPDF Pro:
With Google Docs or Mac's Pages app:
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