I use this script (from here) in order to reduce the size of a pdf file:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \ -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
I have added this within a Dolphin action (service menu) with the line:
Exec=bash -c 'pdf=$(gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -sOutputFile=ebook.pdf "%u"); kdialog --title "Shrink" --msgbox "Done! $pdf";';
I would like the output file name to be automatically based on that of the input file, something like: input_xxx.