Skip to main content
A newer version of this page is available. .

PrintTool Class

The base class for the ReportPrintTool class.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.XtraPrinting.v19.2.dll

Declaration

public class PrintTool :
    PrintToolBase,
    IDisposable

Remarks

The PrintTool class exposes the PrintToolBase.PrintingSystem property that allows you to access a Print Tool’s printing options, and the PrintTool.PreviewForm and PrintTool.PreviewRibbonForm properties that provide access to the options of its Print Preview form.

Example

This example shows how you can print a Windows Forms control (e.g. GridControl) using PrintTool.

using System;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
// ...
private void simpleButton1_Click(object sender, EventArgs e) {
    PrintableComponentLink componentLink = new PrintableComponentLink(new PrintingSystem());
    componentLink.Component = gridControl1;
    componentLink.CreateDocument();
    PrintTool pt = new PrintTool(componentLink.PrintingSystemBase);
    pt.ShowPreviewDialog();
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PrintTool class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also