First you need to install it as:
sudo apt-get install imagemagick
and then convert simply as:
convert foo.jpg foo.pdf
Here's script i wrote to convert all the .jpg files in the current directory to .pdf:
#!/bin/bash
count=1;
for file in *.JPG;
do
echo "$file coverted to $count.pdf"
convert $file $count.pdf
let count=$count+1
done
Now to combine multiple pdfs to one , one needs to install two small packages:
gs and pdftk
next to combine use the following command:
pdftk *.pdf output combined.pdf
where combined.pdf is the new combined pdf formed.
Hope it was useful.
Proud to use open source :)