Search Results for

    Show / Hide Table of Contents

    Class PrintSettings

    A print settings class to use with a IronPrint.Printer functions as an optional parameters.

    Inheritance
    System.Object
    PrintSettings
    Namespace: IronPrint
    Assembly: IronPrint.dll
    Syntax
    public class PrintSettings : Object
    Remarks

    These settings might be overridden by the settings that will be set in the print dialog, as the print dialog is optional and may be invoked using IronPrint.Printer.ShowPrintDialog() or IronPrint.Printer.ShowPrintDialogAsync().

    Use DefaultSettings to access a predefined set of default settings.

    Constructors

    PrintSettings()

    Initializes a new instance of the PrintSettings class with default values.

    Declaration
    public PrintSettings()
    Remarks

    Alternative, you can use DefaultSettings to access a predefined set of default settings.

    Properties

    DefaultSettings

    Initializes a new instance of the PrintSettings class with default values.

    Declaration
    public static PrintSettings DefaultSettings { get; }
    Property Value
    Type Description
    PrintSettings

    Dpi

    Intended print resolution in dots per inch.

    Default value is 300 which is a common value used in commercial printing.

    Declaration
    public int Dpi { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    The actual DPI used for printing might be limited by the capabilities of the printer.

    Flatten

    Flatten the PDF before printing, which is useful for displaying form field values and images.

    Declaration
    public bool Flatten { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    The default value is false, indicating that the PDF will not be flattened before printing.

    Grayscale

    A value indicating whether to print in grayscale.

    Declaration
    public bool Grayscale { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    The default value is false, indicating an attempt to print in color.

    NumberOfCopies

    The number of identical copies to be generated when printing a document.

    Default value is 1 copy

    Declaration
    public int NumberOfCopies { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Note: In certain platforms, there may be limitations that prevent the accurate reproduction of multiple copies. In such cases, the specified value of NumberOfCopies might be ignored, and only one copy will be printed.

    PaperMargins

    The margins to use for printing in millimeters.

    The default value is null, indicating the use of the default margins provided by the printer.

    Declaration
    public Nullable<Margins> PaperMargins { get; set; }
    Property Value
    Type Description
    System.Nullable<Margins>

    PaperOrientation

    The paper orientation. E.g. Automatic, Portrait or Landscape.

    Default value is Automatic

    Declaration
    public PaperOrientation PaperOrientation { get; set; }
    Property Value
    Type Description
    PaperOrientation

    PaperSize

    Set an paper size used by the printer.

    Default value is PrinterDefault

    Declaration
    public PaperSize PaperSize { get; set; }
    Property Value
    Type Description
    PaperSize

    PrinterName

    The name of the printer to use for printing.

    Default value is null which means the current default printer of the operating system will be used.

    Declaration
    public string PrinterName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    If you choose the printer in a PrintDialog, this setting will be ignored.

    To obtain the available printer names, you can use GetPrinterNames() or GetPrinterNamesAsync() to fetch the printer name list.

    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 GetPrinterTrays(String) or GetPrinterTraysAsync(String)
    Declaration
    public string Tray { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    The default value is null, indicating the use of the default tray provided by the printer.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronPrint to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPrint free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.