I need to create thumbnails of pdf files, and I am using Imagemagick to achieve that.
I have tried Pythonmagick and wand to convert the pdf to an image. However, when I try to resize the converted pdf, the resulting image becomes black.
Is there any option to set  -define pdf:use-cropbox=true using python wrappers?
Is there any other method in Python to convert a pdf to a thumbnail?
The code is as follows:
    import wand
    img = wand.image.Image(filename="d:\\test.pdf[0]")
    img.resize(160,160)
    img.save(filename="d:\\test.jpg")