Adding images to pdf:


convert 1.jpg 2.jpg output.pdf

Compress:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=input.pdf output.pdf

Another way to compress:

ps2pdf input.pdf output.pdf