[Python] AttributeError: 'PdfPage' object has no attribute 'render_topil'

Discussão em 'Python' iniciado por Stack, Abril 7, 2025.

  1. Stack

    Stack Membro Participativo

    I am using pypdfium2 version 4.5.0, I am facing this problem

    I want to make use of this render_topil

    pdf = pdfium.PdfDocument(pdf_path)
    page = pdf.get_page(0)
    pil_image = page.render_topil(scale = 300/72)
    image_name = f"Images/{image_name}.jpg"
    pil_image.save(image_name)

    Continue reading...

Compartilhe esta Página