You can try ImageMagick's convert
utility.
On Ubuntu, you can install it with this command:
$ sudo apt-get install imagemagick
Use convert
like this:
$ convert input.pdf output.jpg
# For good quality use these params
$convert -density 300 -quality 100 in.pdf out.jpg