In the poppler-utils packages there is the utility pdftoppm capable of converting pages from a pdf file to ppm, png or jpeg format:
pdftoppm -png file.pdf prefix
will produce prefix-01.png etc. for each page. By default the resolution is 150dpi. Increase the resolution (for higher quality output) as follows:
pdftoppm -rx 300 -ry 300 -png file.pdf prefix
source: http://askubuntu.com/a/50180