Instantiate the PrintSettings class and configure it according to your requirements. Finally, pass the PrintSettings object to one of the print methods. Explore all the available print settings below:
DefaultSettings: A static property that returns a newIronPrint.PrintSettingsinstance populated with default values.PaperSize: Sets thepaperSizeused by the printer.PaperOrientation: Specifies thepaperOrientation(e.g.,PortraitorLandscape).Dpi: Represents the intendedprintResolutionin dots per inch.- Remarks: The actual
Dpiused for printing might be limited by the capabilities of the printer.
- Remarks: The actual
NumberOfCopies: Indicates thenumberOfCopiesto be generated when printing a document.- Remarks: In certain platforms, limitations may exist that prevent the accurate reproduction of multiple copies. In such cases, the specified value of
IronPrint.PrintSettings.NumberOfCopiesmight be ignored, resulting in only one copy being printed.
- Remarks: In certain platforms, limitations may exist that prevent the accurate reproduction of multiple copies. In such cases, the specified value of
PrinterName: Specifies theprinterNameto use for printing.- Remarks: If you choose the printer in a
PrintDialog, this setting will be ignored. To obtain the available printer names, you can useIronPrint.Printer.GetPrinterNamesorIronPrint.Printer.GetPrinterNamesAsyncto fetch the printer name list.
- Remarks: If you choose the printer in a
PaperMargins: Sets thepaperMarginsto use for printing in millimeters.Grayscale: Indicates whether to print ingrayscale.Flatten:Flattenthe PDF before printing, which is useful for displaying form field values and images.- Note: The default value is
false, indicating that the PDF will NOT be flattened before printing unless explicitly set totrue.
- Note: The default value is
Tray:Trayused for the printing job. This allows users to specify a particular tray from which paper should be fed into the printer.- Remarks: If you choose the
trayin aPrintDialog, this setting will be ignored. To obtain the availabletray, you can useIronPrint.Printer.GetPrinterTrays(System.String)orIronPrint.Printer.GetPrinterTraysAsync(System.String). The default value isnull, indicating the use of the default tray provided by the printer. This tray selection property is available only inWindows.
- Remarks: If you choose the