I have already created a program to display and print the printer selection dialog, but it takes time for manual operation, so I would like to know how to specify the printer, print size, and number of sheets by simply pressing the print button.Thank you for your cooperation.
Environment
Windows 10 Pro
Visual Studio Community 2015 C#
If you are using the System.Drawing.Printing
namespace in Windows Form, you can configure the PrintDocument
to PrintSettings
in advance.
//PrintDocument d;
d.PrintSettings.PrinterName="PrinterName";
d. PrintSettings.Copies = Number of copies;
d.DefaultPageSettings.PaperSize=Size;
d.Print();
© 2024 OneMinuteCode. All rights reserved.