private async void PrintBitmap_Click() { if (!IsPrinterClaimed()) { return; } rootPage.ClaimedPrinter.Receipt.IsLetterQuality = true; ReceiptPrintJob job = rootPage.ClaimedPrinter.Receipt.CreateJob(); BitmapFrame logoFrame = await LoadLogoBitmapAsync(); job.PrintBitmap(logoFrame, PosPrinterAlignment.Center); await ExecuteJobAndReportResultAsync(job); }
private async Task <bool> PrintBitmap() { if (!IsPrinterClaimed()) { return(false); } claimedPrinter.Receipt.IsLetterQuality = true; ReceiptPrintJob job = claimedPrinter.Receipt.CreateJob(); BitmapFrame logoFrame = await LoadLogoBitmapAsync(); job.PrintBitmap(logoFrame, PosPrinterAlignment.Center); if (await job.ExecuteAsync()) { rootPage.NotifyUser("Bitmap printed successfully", NotifyType.StatusMessage); return(true); } rootPage.NotifyUser("Was not able to print bitmap", NotifyType.ErrorMessage); return(false); }