ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Common Assembly / GrapeCity.ActiveReports Namespace / PrinterSettings Class / PrinterSettings Constructor / PrinterSettings Constructor(Printer,PrintOptions)
The printer instance.
The print options.
Example

In This Topic
    PrinterSettings Constructor(Printer,PrintOptions)
    In This Topic
    Creates a new instance of PrinterSettings with a specific printer and print options.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal printer As Printer, _
       ByVal printOptions As PrintOptions _
    )
    public PrinterSettings( 
       Printer printer,
       PrintOptions printOptions
    )

    Parameters

    printer
    The printer instance.
    printOptions
    The print options.
    Example
    // Instantiate and configure a Printer object
    var printer = new GrapeCity.ActiveReports.Win.Printing.Printer()
    {
    	PrinterName = "YourPrinterName", // Specify the printer name
    	Landscape = true, // Set landscape orientation
    					  // Additional printer configuration can be done here
    };
    // Configure custom print options
    var printOptions = GrapeCity.ActiveReports.Printing.PrintOptions.CreateDefault();
    printOptions.PageOrder = PageOrder.Vertical;
    printOptions.PagesPerSheet = 2;
    // Create a new instance of PrinterSettings with the custom printer and print options
    var printerSettings = new GrapeCity.ActiveReports.PrinterSettings(printer, printOptions);
    // Example: Use the configured printerSettings for printing
    // Note: Actual printing code would go here, using the configured printerSettings
    See Also