O ImageMagick aceita especificadores de formato em sua linha de comando:
convert -density 600 foo.pdf foo-%02d.jpg
Citação do doc :
Filename References
Optionally, use an embedded formatting character to write a sequential image list. Suppose our output filename is
image-%d.jpg
and our image list includes 3 images. You can expect these images files to be written:image-0.jpg image-1.jpg image-2.jpg