scripts/impression/compatibilise
glondu 3944110889 Nettoyage de qqch qui rendait le script inoprant.
darcs-hash:20070510105210-68412-5560ad4ba8f42c2ae076fe3955217812c0835424.gz
2007-05-10 12:52:10 +02:00

14 lines
301 B
Bash
Executable file

#!/bin/sh
# Rend les pdf compatibles avec Ghostscript
exec >/dev/null 2>/dev/null
if head -n 1 $1 | egrep -q "1.[45]"; then
cd `dirname $1`
FICHIER_PDF=`basename $1`
FICHIER_PS=${FICHIER_PDF%.pdf}.ps
pdftops $FICHIER_PDF
ps2pdf $FICHIER_PS $FICHIER_PDF
rm -f $FICHIER_PS
fi