Are there any open-source command line tool for optimizing PDF in Ubuntu. I have used Ghost Script and i am able to convert the PDF into 72 dpi,
gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/screen \
-dNOPAUSE -dQUIET -dBATCH \
-sOutputFile=myOutput.pdf myInput.pdf
But what i would like to do is mention what dpi i want to convert the PDF to, like a 300 dpi PDF file to 90 dpi PDF file.
I'll quote zweifel's comment on http://www.ubuntugeek.com/ubuntu-tiphowto-reduce-adobe-acrobat-file-size-from-command-line.html:
Thus you should use either the option
dPDFSETTINGS=/printer
or the optiondPDFSETTINGS=/prepress
to get 300 dpi.