Print Job Resolution
The PrintJob class has a PrintOptions property which has a Resolution property used to control the print resolution of a job. This property gets or sets the resolution used when printing the PDF document.
The following examples first demonstrate printing using quality-based resolution settings and then demonstrate using specific resolutions retrieved from the printer’s supported resolutions.
Always ensure that the selected printer supports the desired resolution before applying it to a print job. If you are unsure which resolutions a printer supports, you can query the printer’s supported resolutions using the Printer.Resolutions property.
Printer printer = Printer.Default;
if (printer.Resolutions.Contains(ResolutionList.High))
Dim printer As Printer = Printer.Default
If printer.Resolutions.Contains(ResolutionList.High) Then
Quality-Based Resolution
The following example demonstrates how to print using quality-based resolution settings. The ResolutionList class provides four static resolution presets: Draft, Low, Medium, and High. These presets represent general print quality levels rather than fixed DPI values.
When using quality-based resolutions, the actual DPI used during printing is determined by the printer driver and the capabilities of the selected printer.
InputPdf pdf = new InputPdf(pdfFilePath);
PrintJob printJob = new PrintJob(Printer.Default, pdf);
printJob.PrintOptions.Resolution = ResolutionList.High;
printJob.Print();
Dim pdf As InputPdf = New InputPdf(pdfFilePath)
Dim printJob As PrintJob = New PrintJob(Printer.Default, pdf)
printJob.PrintOptions.Resolution = ResolutionList.High
printJob.Print()
[ResolutionExample.cs](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-cs/ResolutionExample.cs){#gitlink-id target=_blank}
[ResolutionExample.vb](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-vb/ResolutionExample.vb){#gitlink-id target=_blank}
Printer Based Resolution
This example demonstrates how to set the PrintJob resolution using DPI values retrieved from the resolutions supported by the printer.
InputPdf pdf = new InputPdf(pdfFilePath);
Printer printer = new Printer("Printer Name");
PrintJob printJob = new PrintJob(printer, pdf);
printJob.PrintOptions.Resolution = printer.Resolutions\[0\];
printJob.Print();
Dim pdf As InputPdf = New InputPdf(pdfFilePath)
Dim printer As Printer = New Printer("Printer Name")
Dim printJob As PrintJob = New PrintJob(printer, pdf)
printJob.PrintOptions.Resolution = printer.Resolutions(0)
printJob.Print()
[ResolutionExample.cs](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-cs/ResolutionExample.cs){#gitlink-id target=_blank}
[ResolutionExample.vb](https://github.com/DynamicPDF/print-manager-dotnet-core/blob/master/print-manager-dotnet-core-vb/ResolutionExample.vb){#gitlink-id target=_blank}