title: Faster method for printing PDF files in C#
body: <p>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.</p>
  <p>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.</p>
  <p>I am using the code below to print the PDF</p>
  <pre><code>            var printer = _appConfiguration.GetValue&lt;string&gt;(&quot;PRINTERS:RDLReceipt1&quot;);
              var filename = @&quot;C:\\TEMP\\reciept-&quot; + barcode + &quot;.pdf&quot;;
              var nopages = 0;
              using (var pdfDocument = new PdfDocument(filename))
              {
                  nopages = pdfDocument.PageCount;
                  using (var printDocument = pdfDocument.GetPrintDocument())
                  {
                      printDocument.PrinterSettings.PrinterName = printer;
                      printDocument.Print();
                  }
              }
  </code></pre>