Print a PDF to a printer on Server/Desktop

To print a PDF to a default printer.

1PDFDoc pdfdoc = new PDFDoc(filename);
2
3// Setup PrinterMode options
4PrinterMode printerMode = new PrinterMode();
5printerMode.SetCollation(true);
6printerMode.SetCopyCount(1);
7printerMode.SetDPI(600); // regardless of ordering, an explicit DPI setting overrides the OutputQuality setting
8printerMode.SetDuplexing(PrinterMode.DuplexMode.e_Duplex_Auto);
9
10// Print the document on the default printer, name the print job the name of the
11// file, print to the printer not a file, and use printer options:
12Print.StartPrintJob(pdfdoc, "", pdfdoc.GetFileName(), "", null, printerMode, null);

Print a PDF file
Full sample code which illustrates how to print a PDF document using the currently selected default printer.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales