Simple Print Job

When printing, you can print to a specific printer or a default printer. Simple examples of both are illustrated below.

The following example sends a PDF document to a specified printer. As the example illustrates, to print to a specific printer, replace the string "Printer Name" with the printer name you wish sending to the PDF document.

PrintJob printJob = new PrintJob("Printer Name", pdfFilePath);
Dim MyPrintJob As New PrintJob("Printer Name", pdfFilePath)

Sending a PDF document to a defined default printer, without needing to know the actual name of the printer, is accomplished using the static method "Default" of the Printer class. The following code illustrates.

PrintJob printJob = new PrintJob(Printer.Default, pdfFilePath);
Dim MyPrintJob As New PrintJob(Printer.Default, pdfFilePath)


Refer to the print-manager-dotnet-core project on GitHub for examples demonstrating how to use the DynamicPDF PrintManager for .NET. The following class illustrates using a default printer.

In this topic