Print Job Resolution

The PrintJob class has a PrintOptions property which has a Resolution property. This property gets or sets a value indicating the resolution to use when printing. The following two examples first demonstrate how to print PDFs using quality-based resolution and then resolution values retrieved from the printer.

Quality Based Resolution

This example demonstrates how to set quality-based resolution. The ResolutionList class provides four static properties (Draft, Low, Medium, and High) representing a range of resolution qualities. When using these quality-based resolutions, keep in mind that the actual DPI value of the print job is determined by the printer driver, depending on the printer's capabilities.

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()

Printer Based Resolution

This example demonstrates how to set the PrintJob resolution by retrieving the resolution (DPI) values 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()

In this topic