Skip to content

get_pixmap method stuck on one page #4435

@TimothyZero

Description

@TimothyZero

10.3813aaa.918641.pdf

Description of the bug

get_pixmap method stuck on one page.

How to reproduce the bug

import fitz
from PIL import Image

pdf_file = "10.3813aaa.918641.pdf"  # download the file

dpi = 120
page_idx = 2
pdf_path_or_stream = pdf_file
if isinstance(pdf_path_or_stream, str):
    doc = fitz.Document(pdf_path_or_stream)
else:
    doc = fitz.Document(stream=pdf_path_or_stream)
page = doc[page_idx]
pix: fitz.Pixmap = page.get_pixmap(alpha=False, dpi=dpi)
image = Image.frombytes("RGB", (pix.width, pix.height), pix.samples)
image.show()

PyMuPDF version

1.25.5

Operating system

Linux

Python version

3.10

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions