Grabbed and slightly modified info from a ubuntu site to create the following /usr/bin/shrinkpdf script:
#!/bin/bash
#
/usr/bin/pdf2djvu -d 600 $1 -o /tmp/temp.djvu
/usr/bin/djvups -level=3 /tmp/temp.djvu /tmp/temp.ps
/usr/bin/ps2pdf -dOptimize=true -dEmbedAllFonts=true /tmp/temp.ps $1
/bin/rm -f /tmp/temp.djvu /tmp/temp.ps
On my test docs, this reduces size to about 15% of the original. Quality seems good enough.
I'm still looking for a replacement for the "optimize scanned pdf" tool that adobe acrobat pro has (the tool straightens out documents, lightens and darkens output, and fixes common scanning issues).
Another idea would be to have some kind of OCR program read the doc and compute some reasonable keyword so that a reasonably accurate system index of all pdf documents could be created.
