Tuesday, May 20, 2014

Convert PDF to JPEG Python

Convert pdf file to image file using 'PythonMagick' in Python. PythonMagick provides object oriented bindings for the ImageMagick Library. You can dowload PythonMagick

Ex:
>>> import PythonMagick
>>> pdf = 'Invoices.pdf'
>>> p = PythonMagick.Image()
>>> p.density('600')
>>> p.read(pdf)
>>> p.write('test_image.jpg')
>>>

 
Twitter Facebook RSS YouTube Google
© 2014 | Distributed and Designed By Jasad Moozhiyan