var report = new InvoiceReport();
report.DataSource=sourceOfReport;
//Print Directly To Printer
report.CreateDocumentAsync().Wait();
var printTool = new PrintToolBase(report.PrintingSystem);
//if PrinterName is Exist Then Send To it else Save as Pdf
if (invoiceRequest.PrinterName!=null)
printTool.Print(invoiceRequest.PrinterName);
else
printTool.Print();
return Ok();
When I Send Printer Name Like :HP LaserJet Pro MFP M125-M126 PCLmS I Got the Error Of :
Settings to access printer '/HP LaserJet Pro MFP M125-M126 PCLmS' are not valid.
When I Send WithOut Name To Test I Get Error Of:
No Printer is Installed
While there Are A printer Already installed And used To Print Pdf. I Hope To Find Answer Thanks.