I can sort of cancel if I use a CancellationTokenSource and check for cancellation in the AddPages event handler.
protected async void AddPrintPages(object sender, AddPagesEventArgs args)
{
PrintDocument printDoc = (PrintDocument)sender;
for ( uint i = 0; i < _pageCount; i++)
{
if (_cancellationToken.IsCancellationRequested)
break;
var page = await GetPrintPageAsync(i)
printDoc.AddPage(page);
}
printDoc.AddPagesComplete();
}
This skips the remainder of the pages, but any pages that have already been added to the print doc will still be sent.