PrinterSettings.PrinterResolutions : PrinterSettings « System.Drawing.Printing « C# / C Sharp by API






PrinterSettings.PrinterResolutions

  


using System;
using System.Drawing.Printing;

class MainClass {
    static void Main(string[] args) {
        foreach (string printerName in PrinterSettings.InstalledPrinters) {
            Console.WriteLine("Printer: {0}", printerName);

            PrinterSettings printer = new PrinterSettings();
            printer.PrinterName = printerName;
            if (printer.IsValid) {
                Console.WriteLine("Supported Resolutions:");
                foreach (PrinterResolution resolution in printer.PrinterResolutions) {
                    Console.WriteLine("  {0}", resolution);
                }
            }
        }
    }
}

   
    
  








Related examples in the same category

1.PrinterSettings.CanDuplex
2.PrinterSettings.InstalledPrinters
3.PrinterSettings.PrinterName