I'm following the documentation and using the latest PyMuPDF (1.18.13). However Pixmap.tobytes() isn't working for me:
zoom = 2 # zoom factor
mat = fitz.Matrix(zoom, zoom)
pix = page.getPixmap(matrix = mat)
stream = pix.tobytes(output="png")
AttributeError: 'Pixmap' object has no attribute 'tobytes'
What might be the issue here?
