A link to print and export components that implement the IPrintable interface.
NuGet Package: DevExpress.Win.Printing
public class PrintableComponentLink : PrintableComponentLinkBase, IWinLink
Public Class PrintableComponentLink Inherits PrintableComponentLinkBase Implements IWinLink
A control’s export using a PrintableComponentLink is performed in WYSIWYG export mode. Certain controls (e.g., GridControl) can be exported to XLS-XLSX formats in data-aware export mode. In data-aware mode, optimized for subsequent analysis of grid data within Microsoft Excel, various data shaping options that are applied within a source control are retained in output XLS-XLSX documents. See Export to XLS and XLSX Formats to learn more.
Afterwards, you can create a document and either show its Print Preview (by calling the PrintableComponentLink.ShowPreview or PrintableComponentLink.ShowPreviewDialog method), or print it (by calling the PrintableComponentLink.Print or PrintableComponentLink.PrintDlg method).
The following DevExpress controls support the IPrintable interface.
Some controls (like RichEditControl) will ignore the page options provided by the corresponding printing links and use their own page options, instead.
For code samples, see the following resources:
- How to: Use the PrintableComponentLink to Print DevExpress Controls
(An implementation of the IPrintable interface for a custom control, to print and export it using the PrintableComponentLink class.)
- How to print DevExpress ASP.NET controls via XtraReports