[intranet/impression, lib/impression_canon] modifications de l'AJAX
Ignore-this: 8beebdd91330205ba08932d269ccb6b * Ajout de l'option livret * agra{f,ph}es -> agrafage * paper -> papier * True & False au lieu d'utiliser des noms de constantes à rallonge darcs-hash:20090516014010-bd074-69a54cc50369c5351542a7b82ddf6b5215e421d1.gz
This commit is contained in:
parent
fdfd2254d3
commit
d87c41e637
4 changed files with 50 additions and 36 deletions
|
@ -183,6 +183,10 @@ class impression:
|
|||
couleur = kw.get('couleur', None)
|
||||
if couleur in [True, False]:
|
||||
self._settings['couleur'] = couleur
|
||||
elif couleur == "True":
|
||||
self._settings['couleur'] = True
|
||||
elif couleur == "False":
|
||||
self._settings['couleur'] = False
|
||||
|
||||
try:
|
||||
if int(kw['copies']) >= 1:
|
||||
|
@ -191,6 +195,8 @@ class impression:
|
|||
pass
|
||||
|
||||
recto_verso = kw.get('recto_verso', None)
|
||||
if recto_verso == "True": recto_verso = True
|
||||
if recto_verso == "False": recto_verso = False
|
||||
if recto_verso in [True, False]:
|
||||
self._settings['recto_verso'] = recto_verso
|
||||
|
||||
|
@ -207,6 +213,8 @@ class impression:
|
|||
self._settings['agrafage'] = agrafage
|
||||
|
||||
livret = kw.get('livret', None)
|
||||
if livret == "True": livret = True
|
||||
if livret == "False": livret = False
|
||||
if livret in [True, False]:
|
||||
self._settings['livret'] = livret
|
||||
self._settings['portrait'] = not(livret)
|
||||
|
@ -330,9 +338,9 @@ class impression:
|
|||
c_impression = c_papier * pages + impression.c_face_nb * pages
|
||||
|
||||
# Cout des agrafes
|
||||
if self._settings['agrafe'] in ["Top", "Bottom", "Left", "Right"] or self._settings['livret']:
|
||||
if self._settings['agrafage'] in ["Top", "Bottom", "Left", "Right"] or self._settings['livret']:
|
||||
nb_agrafes = 2
|
||||
elif self._settings['agrafe'] in ["None", None]:
|
||||
elif self._settings['agrafage'] in ["None", None]:
|
||||
nb_agrafes = 0
|
||||
else:
|
||||
nb_agrafes = 1
|
||||
|
@ -397,10 +405,10 @@ class impression:
|
|||
#Indique la présence d'un bac de sortie avec agrafeuse
|
||||
# options += " -o Option20=MBMStaplerStacker -o OutputBin=StackerDown"
|
||||
|
||||
if self._settings['paper'] == 'A4tr':
|
||||
if self._settings['papier'] == 'A4tr':
|
||||
options += ' -o InputSlot=SideDeck -o MediaType=OHP'
|
||||
options += ' -o pdf-paper=571x817 -o PageSize=A4'
|
||||
elif self._settings['paper'] == 'A4':
|
||||
elif self._settings['papier'] == 'A4':
|
||||
options += ' -o pdf-paper=571x817 -o PageSize=A4'
|
||||
else:
|
||||
options += ' -o pdf-expand -o pdf-paper=825x1166 -o PageSize=A3'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue