CUPS.CancelJob
--------------

Cancel a print job on the default server.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CUPS](component_CUPS.md) | [2.5](newinversion25.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |

MBS( "CUPS.CancelJob"; Name; JobID ) 

**MBS**( **"CUPS.CancelJob";** /\* Cancel a print job on the default server. \*/  
**$Name**; /\* Name of the printer.e.g. "Brother\_DCP\_8085DN" \*/   
**$JobID**) /\* The job number of the job you want to cancel. Pass -1 to cancel all jobs or 0 to cancel current job.e.g. 123 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | Name of the printer. | "Brother\_DCP\_8085DN" |
| JobID | The job number of the job you want to cancel. Pass -1 to cancel all jobs or 0 to cancel current job. | 123 |

### Result

Returns 1 on success, 0 on failure.

### Description

Cancel a print job on the default server.  
See also newer [Printer.CancelJob](PrinterCancelJob.md) function.  
### Examples

Cancel all jobs on this printer queue:

 MBS ( "CUPS.CancelJob"; "Brother\_DCP\_8085DN"; -1 )  
### See also

- [CUPS.LastErrorCode](CUPSLastErrorCode.md)
- [CUPS.LastErrorMessage](CUPSLastErrorMessage.md)
- [Printer.CancelJob](PrinterCancelJob.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th May 2026

  
[CNGroup.Name](CNGroupName.md) - [CUPS.GetDefaultPrinterName](CUPSGetDefaultPrinterName.md)

[HTML Version](CUPSCancelJob.shtml)