Some software products, especially when using fpdi, require PDF version 1.5 and can no longer work with PDF version 1.4. This can cause huge problems, especially if, for example, 100th PDFs are already on the server. Here is a small script which, after installing Ghostscript, performs this conversion for all files in the folder.

Info about the file with

pdfinfo Dateiname

The Script:

for i in `ls *.pdf`
    echo "Working on $i ..."
    mv $i $i.SAV
    gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$i $i.SAV