MCPcopy Create free account
hub / github.com/RUB-NDS/PRET / do_reset

Method do_reset

postscript.py:454–466  ·  view source on GitHub ↗

Reset PostScript settings to factory defaults.

(self, arg)

Source from the content-addressed store, hash-verified

452
453 # ------------------------[ reset ]-----------------------------------
454 def do_reset(self, arg):
455 "Reset PostScript settings to factory defaults."
456 # reset system parameters -- only works if printer is turned off
457 ''' »A flag that, if set to true immediately before the printer is turned
458 off, causes all nonvolatile parameters to revert to their factory default
459 values at the next power-on. The set of nonvolatile parameters is product
460 dependent. In most products, 'PageCount' cannot be reset. If the job that
461 sets FactoryDefaults to true is not the last job executed straight before
462 power-off, the request is ignored; this reduces the chance that malicious
463 jobs will attempt to perform this operation.« '''
464 self.cmd('<< /FactoryDefaults true >> setsystemparams', False)
465 output().raw("Printer must be turned off immediately for changes to take effect.")
466 output().raw("This can be accomplished, using the 'restart' command in PJL mode.")
467
468 # ------------------------[ format ]----------------------------------
469 def do_format(self, arg):

Callers

nothing calls this directly

Calls 3

cmdMethod · 0.95
outputClass · 0.90
rawMethod · 0.80

Tested by

no test coverage detected