ComponentOne List for WinForms
Export, Import, and Print / Print
In This Topic
    Print
    In This Topic

    List lets you print the list and perform various basic and advanced print settings using its built-in methods and properties. Let us explore how to use these methods and properties to print the List.

     Print dialog in List

    Note: C1List's printing features uses the C1.Win.Printing NuGet package, which provides three libraries: C1.PrintDocument, C1.Win.PrintPreview and C1.Win.RibbonPreview.

    Print List

    You can use Print method of the PrintInfo class to print the entire list and its content. This method has an optional parameter, printerSettings that allows you to specify the printer settings.

    The following code demonstrates how to print the list and its content.

    C#
    Copy Code
    //print the list
    c1List1.PrintInfo.Print();
    

    Print Options

    The PrintInfo class provides various options to print the list. It lets you set many advanced printing options such as header and footer fonts, page margins, page orientation, and much more.

    Use the following code to print the List using advanced print options. The following code example sets the page footer, footer height, and bottom margin.

    C#
    Copy Code
    c1List1.PrintInfo.PageFooter = "All Rights Reserved";
    c1List1.PrintInfo.PageFooterHeight = 10;
    c1List1.PrintInfo.PageSettings.Margins.Bottom = 15;