IronPrint How-Tos Print Settings How to Configure Print Settings Chaknith Bin Updated:June 22, 2025 A print setting refers to a configuration or set of parameters that dictate how a document or content should be printed. These settings include details such as paper size, orientation (e.g., portrait or landscape), print resolution (dots per inch - DPI), the number of copies, printer selection, margins, and options like grayscale printing. Users can customize these settings to achieve specific printing preferences and requirements. Get started with IronPrint Start using IronPrint in your project today with a free trial. First Step: Start for Free How to Configure Print Settings Download a C# library for configuring print settings Instantiate the PrintSettings class Configure the PrintSettings object according to your preferences Pass it to the Print or ShowPrintDialog method Check the printed PDF document and see that the print settings have been applied Set Print Settings To configure print settings, instantiate the PrintSettings class and configure it according to your preferences. In the Print or ShowPrintDialog methods, pass the PrintSettings object as the second parameter. The code example below illustrates this usage. // Import the necessary namespace for IronPrint using IronPrint; // Initialize a new instance of the PrintSettings class PrintSettings settings = new PrintSettings(); // Configure various print settings settings.PaperSize = PaperSize.A4; // Set paper size to A4 settings.PaperOrientation = PaperOrientation.Landscape; // Set paper orientation to Landscape settings.Dpi = 300; // Set print resolution to 300 DPI settings.NumberOfCopies = 2; // Set the number of copies to 2 settings.PrinterName = "MyPrinter"; // Set the name of the printer settings.PaperMargins = new Margins(10, 10, 10, 10); // Set margins to 10mm on each side settings.Grayscale = true; // Print in grayscale // Use the PrintSettings in the Print method IronPrint.Printer.Print(document, settings); // Import the necessary namespace for IronPrint using IronPrint; // Initialize a new instance of the PrintSettings class PrintSettings settings = new PrintSettings(); // Configure various print settings settings.PaperSize = PaperSize.A4; // Set paper size to A4 settings.PaperOrientation = PaperOrientation.Landscape; // Set paper orientation to Landscape settings.Dpi = 300; // Set print resolution to 300 DPI settings.NumberOfCopies = 2; // Set the number of copies to 2 settings.PrinterName = "MyPrinter"; // Set the name of the printer settings.PaperMargins = new Margins(10, 10, 10, 10); // Set margins to 10mm on each side settings.Grayscale = true; // Print in grayscale // Use the PrintSettings in the Print method IronPrint.Printer.Print(document, settings); ' Import the necessary namespace for IronPrint Imports IronPrint ' Initialize a new instance of the PrintSettings class Private settings As New PrintSettings() ' Configure various print settings settings.PaperSize = PaperSize.A4 ' Set paper size to A4 settings.PaperOrientation = PaperOrientation.Landscape ' Set paper orientation to Landscape settings.Dpi = 300 ' Set print resolution to 300 DPI settings.NumberOfCopies = 2 ' Set the number of copies to 2 settings.PrinterName = "MyPrinter" ' Set the name of the printer settings.PaperMargins = New Margins(10, 10, 10, 10) ' Set margins to 10mm on each side settings.Grayscale = True ' Print in grayscale ' Use the PrintSettings in the Print method IronPrint.Printer.Print(document, settings) $vbLabelText $csharpLabel Available Print Settings Explore all available print settings options below: DefaultSettings: Initializes a new instance of the IronPrint.PrintSettings class with default values. PaperSize: Sets the paper size used by the printer. The default value is IronPrint.PaperSize.PrinterDefault. PaperOrientation: Specifies the paper orientation (e.g., Portrait or Landscape). The default value is IronPrint.PaperOrientation.Portrait. Dpi: Represents the intended print resolution in dots per inch. The default value is 300, a common setting used in commercial printing. Remarks: The actual DPI used for printing might be limited by the capabilities of the printer. NumberOfCopies: Indicates the number of identical copies to be generated when printing a document. The default value is 1 copy. Remarks: In certain platforms, limitations may exist that prevent the accurate reproduction of multiple copies. In such cases, the specified value of IronPrint.PrintSettings.NumberOfCopies might be ignored, resulting in only one copy being printed. PrinterName: Specifies the name of the printer to use for printing. The default value is null, meaning the current default printer of the operating system will be used. Remarks: If you choose the printer in a PrintDialog, this setting will be ignored. To obtain the available printer names, you can use IronPrint.Printer.GetPrinterNames or IronPrint.Printer.GetPrinterNamesAsync to fetch the printer name list. PaperMargins: Sets the margins to use for printing in millimeters. The default value is null, indicating the use of the default margins provided by the printer. Grayscale: Indicates whether to print in grayscale. Remarks: The default value is false, indicating an attempt to print in color. Flatten: Flatten the PDF before printing, which is useful for displaying form field values and images. The default value is false, indicating that the PDF will be flattened before printing. Tray: Printer tray used for the printing job. This allows users to specify a particular tray from which paper should be fed into the printer. If you choose the tray in a PrintDialog, this setting will be ignored. To obtain the available tray, you can use IronPrint.Printer.GetPrinterTrays(System.String) or IronPrint.Printer.GetPrinterTraysAsync(System.String). The default value is null, indicating the use of the default tray provided by the printer. This tray selection property is available only in Windows. Frequently Asked Questions How can I configure print settings in C#? You can configure print settings in C# by using the IronPrint library. First, instantiate the PrintSettings class and set your desired parameters such as paper size, orientation, DPI, and more. Then, pass the configured PrintSettings object to the Print or ShowPrintDialog methods. What paper sizes are available for printing? IronPrint allows you to set various paper sizes through the PaperSize property of the PrintSettings class. By default, it is set to IronPrint.PaperSize.PrinterDefault but can be customized to sizes like A4, Letter, and others. Can I change the orientation of the printed document? Yes, you can change the orientation by setting the PaperOrientation property in the PrintSettings class. It supports Portrait and Landscape orientations. How do I adjust the print resolution (DPI)? In IronPrint, you can adjust the print resolution by setting the Dpi property in the PrintSettings class. The default resolution is 300 DPI. Is it possible to print multiple copies using IronPrint? Yes, by setting the NumberOfCopies property in the PrintSettings class, you can specify how many copies to print. Note that some platforms might have limitations affecting this feature. How can I select a specific printer for the print job? To select a specific printer, set the PrinterName property in the PrintSettings class. If you don't specify a printer, the default system printer will be used. Can I configure the margins for my printout? Yes, you can configure the print margins by setting the PaperMargins property in the PrintSettings class to your desired millimeter values. How do I print documents in grayscale? To print in grayscale, set the Grayscale property to true in the PrintSettings class. The default setting is false, which attempts to print in color. What does the Flatten property do? The Flatten property in IronPrint is used to flatten a PDF before printing. This process is beneficial for ensuring form fields and images are properly displayed in the printout. How can I specify a printer tray for the print job? You can specify a printer tray by setting the Tray property in the PrintSettings class. However, if a tray is selected in a PrintDialog, this property will be ignored. IronPrint provides methods like GetPrinterTrays to list available trays. Chaknith Bin Chat with engineering team now Software Engineer Chaknith works on IronXL and IronBarcode. He has deep expertise in C# and .NET, helping improve the software and support customers. His insights from user interactions contribute to better products, documentation, and overall experience. Ready to Get Started? Free NuGet Download View Licenses