Skip to main content

Simple Print

Version: 4.0

Simple Printing

When printing, you can send a PDF document either to a specific printer or to the system’s default printer. Simple examples of both approaches are illustrated below.

The following example sends a PDF document to a specified printer. To print to a specific printer, replace the string "Printer Name" with the name of the printer you want to use.

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

[SpecificPrinter.cs](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-cs/SpecificPrinter.cs){#gitlink-id target=_blank}


[SpecificPrinter.vb](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-vb/SpecificPrinter.vb){#gitlink-id target=_blank}

Printing to the system’s default printer, without needing to know the printer’s actual name, is accomplished using the static Default property of the Printer class. The following example illustrates this approach.

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

[SimplePrint.cs](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-cs/SimplePrint.cs){#gitlink-id target=_blank}


[SimplePrint.vb](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-vb/SimplePrint.vb){#gitlink-id target=_blank}