#!c:/Python27/python.exe -u
import PythonMagick
img = PythonMagick.Image('Hello.pdf') # use your full path here
img.write('original.jpeg')
imgLowRes = PythonMagick.Image(img) # make a copy
imgLowRes.sample('220x')
imgLowRes.write('lowRes.jpeg')
img.sample('48x')
img.write('thumb.jpeg')