Script pour contourner le problme des PDFs avec une version trop rcente.
darcs-hash:20061011135059-68412-96642b5c02d4c2d0b2ddd548afeaacf881fd381d.gz
This commit is contained in:
parent
d9872f5205
commit
1dac80ee23
2 changed files with 16 additions and 0 deletions
|
@ -274,6 +274,7 @@ class fichier_impression:
|
|||
fd_fichier_pdf = open(self.nom_fichier_pdf, 'w')
|
||||
fd_fichier_pdf.write(f_value)
|
||||
fd_fichier_pdf.close()
|
||||
os.system("/usr/scripts/impression/compatibilise %s" % self.nom_fichier_pdf)
|
||||
except Exception, inst:
|
||||
raise ErreurImpression("class :erreur dans enregistrement du .pdf %s: %s" % (self.nom_fichier_pdf,str(inst)))
|
||||
os.chmod(self.nom_fichier_pdf, 0640)
|
||||
|
|
15
impression/compatibilise
Executable file
15
impression/compatibilise
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Rend les pdf compatibles avec Ghostscript
|
||||
|
||||
set -e
|
||||
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
|
||||
rm -f $FICHIER_PS
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue