(Almost) Automatically convert files into PDF
I’m learning Numerical Analysis right now and a friend of mine found some really nice PS files by dr Marian Bubek ( http://www.icsr.agh.edu.pl/~mownit/mownit.html ). I was really happy to see some *.ps but some people from my fellow students started complaining that they’d rather have pdf’s and not ghostscript files (who knows why they’d do..?). Anyways, they all had “manual” repetitious methods for converting the files – even uploading to somewebsite to have them converted over there “in the cloud”… I though of a slightly quicker and more efficient way, here it is, hope you’ll like it. Ah, there is One “non standard” requirement for this to work, you have to install cups-pdf :-)
-
mv www.icsr.agh.edu.pl/* .
-
rm -rf www.icsr.agh.edu.pl/
-
-
for file in `dir -f *` ; do
-
lpr -P 'cups-PDF' $file;
-
echo "press enter when cups is done printing…" #yeah, i got lazy here, one could watch lpq for changes etc.
-
read oczekiwanie;
-
mv /home/ktoso/Pulpit/cups-pdf/template.pdf ./$file;
-
done;
-
# ________________
-
#< Happy hacking! >
-
# —————-
-
# \ ^__^
-
# \ (oo)\_______
-
# (__)\ )\/\
-
# ||—-w |
-
# || ||


Post a reply