Expression printer:abort() aborts the current print run. Returns true if the print run was successfully aborted. Property printer.printerState will then be "Aborted". It is not always possible to abort a print job.
printer:abort()
true
printer.printerState
"Aborted"