Skip to content

get_pixmap may cause large image size #25

@BrentHuang

Description

@BrentHuang

doc = fitz.open(pdf_file)
for page in doc:
pix = page.get_pixmap()
img_file = f'{img_file_prefix}-{page.number}.jpg'
pix.save(img_file)

Will get_pixmap cause the generated JPG image to be too large in the above code? Is there a better way to convert every page in the PDF into a JPG image?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions