for %%i in (*.pdf) DO ( convert -thumbnail x310 -background white -alpha remove "%%i[0]" "%%~ni.jpg" )