HiQPdf DocumentationPrint PDF to a PrinterQuickly Create High Quality PDFs

With HiQPdf Library you can print PDF to a printer using the HiQPdfPdfPrinter class. You can print PDF files using the PdfPrinterPrintPdf(String, Int32, Int32) method or you can print PDF documents from a memory buffer using the PdfPrinterPrintPdf(Byte, Int32, Int32) method. You can set printer name, the paper size, orientation and margins and you have the option to print silently without showing any progress dialog.

Silently Print a PDF Document to a Printer

In this demo you can learn how to silently print a PDF document. You can select the printer name, the range of PDF pages to print and you can set an option to enable the silent printing.

Demo Source Code

// create the PDF printer object
PdfPrinter pdfPrinter = new PdfPrinter();

// optionally enable the silent printing
pdfPrinter.SilentPrinting = true;

// select the printer
pdfPrinter.PrinterSettings.PrinterName = "My Printer Name";

// send the PDF to printer
pdfPrinter.PrintPdf(pdfFile, fromPdfPageNumber, toPdfPageNumber);