【发布时间】:2017-07-28 09:57:19
【问题描述】:
我想将多页 PDF 转换为单个 PNG,这可以通过 CLI 使用 convert in.pdf -append out%d.png per Convert multipage PDF to a single image 来实现。
我可以在 Python 中实现同样的效果而无需使用外壳吗?我目前有:
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")
【问题讨论】:
标签: python imagemagick wand magickwand