I'm trying to convert a multipage PDF file to image with PyMuPDF:
pdffile = "input.pdf"
doc = fitz.open(pdffile)
page = doc.loadPage() # number of page
pix = page.getPixmap()
output = "output.tif"
pix.writePNG(output)
But I need to convert all the pages of the PDF file to a single image in multi-page tiff, when I give the page argument a page range, it just takes one page, does anyone know how I can do it?