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
    IronPrint_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronPrint