I'd like to convert a multipage PDF to a single PNG, which can be achieved via the CLI with convert in.pdf -append out%d.png
per Convert multipage PDF to a single image.
Can I achieve the same in Python without shelling out? I currently have:
with Image(filename=pdf_file_path, resolution=150) as img:
img.background_color = Color("white")
img.alpha_channel = 'remove'
img.save(filename=pdf_file_path[:-3] + "png")