Some test text!

Print a PDF

To print a PDF to a default printer with optimal compression.

PDFDoc pdfdoc = new PDFDoc(input_path + "tiger.pdf");

// use the PDF::Print::StartPrintJob interface
// This is silent (no progress dialog) and blocks until print job is at spooler
// The rasterized print job is compressed before sending to printer

// Setup printing options:
PrinterMode printerMode = new PrinterMode();
printerMode.SetAutoCenter(true);
printerMode.SetAutoRotate(true);
printerMode.SetCollation(true);
printerMode.SetCopyCount(1);
printerMode.SetDPI(300); // regardless of ordering, an explicit DPI setting overrides the OutputQuality setting
printerMode.SetDuplexing(PrinterMode.DuplexMode.e_Duplex_Auto);
printerMode.SetNUp(PrinterMode.NUp.e_NUp_1_1, PrinterMode.NUpPageOrder.e_PageOrder_LeftToRightThenTopToBottom);
printerMode.SetOrientation(PrinterMode.Orientation.e_Orientation_Portrait);
printerMode.SetOutputAnnot(PrinterMode.PrintContentTypes.e_PrintContent_DocumentAndAnnotations);

// Print the document on the default printer, name the print job the name of the
// file, print to the printer not a file, and use printer options:
Print.StartPrintJob(pdfdoc, "", pdfdoc.GetFileName(), "", pagesToPrint, printerMode, null);

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

Get the answers you need: Support