[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
   [Expand]Product Information
   [Expand]Getting Started
   [Collapse]Fundamental Concepts
     Document Creation Approaches
     Classes Hierarchy: Bricks
     Class Hierarchy: Printing
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Document Creation Approaches

This topic demonstrates how you can print and/or export a visual control or a non-visual component using Printing Links added to a Printing System collection.

This topic consists of the following sections.

Expanded Print Standard Windows Forms Controls

To print standard Windows Forms controls, the XtraPrinting Library provides the following standard link types (all deriving from the base Link class).

  • ListViewLink - a link to print the System.Windows.Forms.ListView control.
  • RichTextBoxLink - a link to print the System.Windows.Forms.RichTextBox control.
  • TreeViewLink - a link to print the System.Windows.Forms.TreeView control.
  • DataGridLink - a link to print the System.Windows.Forms.DataGrid control.

For code samples, see How to: Print a TreeView Control and How to: Print a DataGrid Control.

Expanded Print DevExpress Controls

The following DevExpress controls implement the IPrintable interface and can be printed using the PrintableComponentLink.

The following web controls implement the IPrintable interface and can be directly exported to a stream or response in various document formats using the methods of their corresponding exporter objects.

ASP.NET WebForms Control Exporter
ASPxGridView ASPxGridViewExporter
ASPxCardView ASPxCardViewExporter
ASPxVerticalGrid ASPxVerticalGridExporter
ASPxPivotGrid ASPxPivotGridExporter
ASPxTreeList ASPxTreeListExporter
ASP.NET MVC Control Exporter
MVCxGridView MVCxGridViewExporter
MVCxPivotGrid MVCxPivotGridExporter
MVCxTreeList MVCxTreeListExporter
MVCxCardView MVCxCardViewExporter
MVCxVerticalGrid MVCxVerticalGridExporter

For more information, see How to: Use the PrintableComponentLink to Print DevExpress Controls.

Expanded Print Custom Components

To print your custom component using Printing System, this component should implement the IPrintable interface, after which you can print it using the PrintableComponentLink class.

For more information, see How to: Create a Printable ListView Descendant Implementing the IPrintable Interface.

Expanded Additional Customization

The Link class provides a set of events, each intended to create a specific document section.

In any of these event handlers, you can customize the CreateAreaEventArgs.Graph property, which provides access to a Brick Graphics object that is used to create Bricks of different types.

Handle these events in the following order to create and/or modify your document sections.

After finishing modifying document sections, call the Link.CreateDocument method (to create a paginated document that is ready to be previewed, printed or exported) or the Link.ShowPreview method (which creates a document and then shows it in a Print Preview form).

For more information, see How to: Use Link Events (Complete Sample).

Expanded See Also

Is this topic helpful?​​​​​​​