Basically this:
convert -density 300 $FILE.pdf $FILE.pngThis should make a white background transparent:
convert -density 300 $FILE.pdf -transparent white $FILE.pngUsing Ghostscript directly seems much better for transparency:
gs -q -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r300 -dEPSCrop -sOutputFile=$FILE.png $FILE.pdf