查看的python-uno和imagemagick实例,都只是转换了文档第一页,怎么把全部页面转换成jpg呢?
1
hahastudio Aug 7, 2015
|
2
eriale Aug 7, 2015 我是先把doc转换成pdf,然后再转jpg。
你可以用Wand(http://docs.wand-py.org/en/0.4.1/)来转: from wand.image import Image with Image(filename='filename.pdf') as pdf: with pdf.convert('jpeg') as image: image.save(filename='result.jpeg') |
3
gully Aug 7, 2015
使用过好几个, 最靠谱的是基于 mupdf 的 Python 绑定: https://github.com/rk700/PyMuPDF
demo: https://github.com/rk700/PyMuPDF/blob/master/demo/demo.py |