[lib/impression_canon, intranet/impression] gestion de pdfbook

Ignore-this: 11acbb5ac4700d722236fd5f169933b2

darcs-hash:20090516015444-bd074-71fb4a65b486706af7d6b6a780ec4782b0935f53.gz
This commit is contained in:
Antoine Durand-Gasselin 2009-05-16 03:54:44 +02:00
parent 0c499d75b6
commit da152761b4
2 changed files with 14 additions and 6 deletions

View file

@ -174,12 +174,15 @@ class impression:
def _pdfbook(self):
if self.taille == 'A3':
pdfbook = "pdfbook --paper a3paper %s"
if self._settings['papier'] == 'A3':
newfile = self._fichier[:-4] + '-a3book.pdf'
pdfbook = "pdfbook --paper a3paper %%s --outfile %s" % newfile
else:
pdfbook = "pdfbook %s"
(status, rep) = commands.getstatusoutput(pdfbook % self._fichier)
self._fichier = "%s-book.pdf" % self.n_fichier[:-4]
newfile = self._fichier[:-4] + '-book.pdf'
pdfbook = "pdfbook %%s --outfile %s" % newfile
(status, rep) = getstatusoutput(pdfbook % self._fichier)
LOG.info("%s | rep: %s" % ((pdfbook % self._fichier), rep))
self._fichier = newfile
if status != 0:
LOG.error("pdfbook status:%d | rep: %s" % (status, rep))
raise FichierInvalide, ("pdfbook: Impossible de convertir le fichier",