94 | | dic = pages.setdefault(number, { "copies" : 1, "mediasource" : "Main", "mediasize" : "Default", "mediatype" : "Plain", "orientation" : "Portrait", "escaped" : ""}) |
| 94 | dic = pages.setdefault(number, { "copies" : 1, "mediasource" : "Main", "mediasize" : "Default", "mediatype" : "Plain", "orientation" : "Portrait", "escaped" : "", "duplex": 0}) |
380 | | page = pages.get(pnum, pages.get(pnum - 1, pages.get(0, { "copies" : 1, "mediasource" : "Main", "mediasize" : "Default", "mediatype" : "Plain", "orientation" : "Portrait", "escaped" : ""}))) |
| 382 | page = pages.get(pnum, pages.get(pnum - 1, pages.get(0, { "copies" : 1, "mediasource" : "Main", "mediasize" : "Default", "mediatype" : "Plain", "orientation" : "Portrait", "escaped" : "", "duplex": 0}))) |
401 | | defaultdm = pjlparser.default_variables.get("DUPLEX", "") |
402 | | if defaultdm : |
403 | | if defaultdm.upper() == "ON" : |
404 | | defaultduplexmode = "Duplex" |
405 | | else : |
406 | | defaultduplexmode = "Simplex" |
407 | | envdm = pjlparser.environment_variables.get("DUPLEX", "") |
408 | | if envdm : |
409 | | if envdm.upper() == "ON" : |
410 | | duplexmode = "Duplex" |
411 | | else : |
412 | | duplexmode = "Simplex" |
413 | | else : |
414 | | if not oldduplexmode : |
415 | | duplexmode = defaultduplexmode |
416 | | else : |
417 | | duplexmode = oldduplexmode |
| 403 | if page["duplex"] : |
| 404 | duplexmode = "Duplex" |
| 405 | else : |
| 406 | defaultdm = pjlparser.default_variables.get("DUPLEX", "") |
| 407 | if defaultdm : |
| 408 | if defaultdm.upper() == "ON" : |
| 409 | defaultduplexmode = "Duplex" |
| 410 | else : |
| 411 | defaultduplexmode = "Simplex" |
| 412 | envdm = pjlparser.environment_variables.get("DUPLEX", "") |
| 413 | if envdm : |
| 414 | if envdm.upper() == "ON" : |
| 415 | duplexmode = "Duplex" |
| 416 | else : |
| 417 | duplexmode = "Simplex" |
| 418 | else : |
| 419 | duplexmode = oldduplexmode or defaultduplexmode |