---
UID: NF:documenttarget.IPrintDocumentPackageTarget.Cancel
title: IPrintDocumentPackageTarget::Cancel (documenttarget.h)
description: Cancels the current print job.
old-location: xps\iprintdocumentpackagetarget_cancel.htm
tech.root: printdocs
ms.assetid: 57CE4050-2EC4-4137-A3EF-A72B07FF5232
ms.date: 12/05/2018
ms.keywords: Cancel, Cancel method [XPS Documents and Packaging], Cancel method [XPS Documents and Packaging],IPrintDocumentPackageTarget interface, IPrintDocumentPackageTarget interface [XPS Documents and Packaging],Cancel method, IPrintDocumentPackageTarget.Cancel, IPrintDocumentPackageTarget::Cancel, documenttarget/IPrintDocumentPackageTarget::Cancel, xps.iprintdocumentpackagetarget_cancel
f1_keywords:
- documenttarget/IPrintDocumentPackageTarget.Cancel
dev_langs:
- c++
req.header: documenttarget.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: Windows 8 [desktop apps \| UWP apps]
req.target-min-winversvr: Windows Server 2012 [desktop apps \| UWP apps]
req.kmdf-ver: 
req.umdf-ver: 
req.ddi-compliance: 
req.unicode-ansi: 
req.idl: 
req.max-support: 
req.namespace: 
req.assembly: 
req.type-library: 
req.lib: 
req.dll: 
req.irql: 
topic_type:
- APIRef
- kbSyntax
api_type:
- COM
api_location:
- Documenttarget.h
api_name:
- IPrintDocumentPackageTarget.Cancel
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# IPrintDocumentPackageTarget::Cancel


## -description


Cancels the current print job.


## -parameters








## -returns



If the <b>Cancel</b> method completes successfully, it returns an S_OK. Otherwise it returns the appropriate HRESULT error code.




## -see-also




<a href="https://docs.microsoft.com/windows/desktop/api/documenttarget/nn-documenttarget-iprintdocumentpackagetarget">IPrintDocumentPackageTarget</a>
 

 

