I currently have a C# console application that prints PDF documents. My problem is that it take a lot of time for the pdf to get spooled and eventually printed. Even when I set the printer driver to Direct Printing it still takes some time.
I am looking for ways to speed up the printing process. I would appreciate any suggestions. I will be willing to look at Free or inexpensive nuget packages. Or any Silent methods of printing. I have tried using the adobe dll but that opens up a window, which I am trying to avoid.
I am using the code below to print the PDF
var printer = _appConfiguration.GetValue<string>("PRINTERS:RDLReceipt1");
var filename = @"C:\\TEMP\\reciept-" + barcode + ".pdf";
var nopages = 0;
using (var pdfDocument = new PdfDocument(filename))
{
nopages = pdfDocument.PageCount;
using (var printDocument = pdfDocument.GetPrintDocument())
{
printDocument.PrinterSettings.PrinterName = printer;
printDocument.Print();
}
}