[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Getting Started
   [Collapse]Concepts
     ASPxRichEdit Control
    [Expand]Document
     Supported Document Formats and Printing
     Import and Export
     Formatting Characters
     Formatting Paragraphs
     AutoCorrect
    [Expand]Fields
     Mail Merge
     Table of Contents
     Restrictions
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     Adaptivity
     HTML Tag Interpretation
     Keyboard Shortcuts
   [Expand]Examples
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Import and Export

This document provides an overview of techniques, methods, and properties used to load and save documents in different formats.

Expanded Load a Document

An end-user can use the standard Open command from the ribbon File tab to load a file into the ASPxRichEdit control. It invokes the built-in Open dialog. You can hide or disable this command to restrict the user's ability to load documents using the ASPxRichEditBehaviorSettings.Open property.

Call the ASPxRichEdit.Open method to load a document programmatically, either from a file or a stream - the file format can be specified explicitly or deduced from the file extension.

Expanded Save a Document

An end-user can use the standard SaveAs command from the ribbon File tab to save a document. This command invokes the built-in Save As... dialog. The ribbon Save command can also be used to save modifications under the same name, without invoking any dialog. Use the ASPxRichEditBehaviorSettings.SaveAs and ASPxRichEditBehaviorSettings.Save properties to restrict the end-users' ability to save files.

The RichEdit API has the ASPxRichEdit.Save method to save current modifications, and the ASPxRichEdit.SaveCopy and RichEditDocumentInfo.SaveCopy methods that allow you to export a document to any of the supported file formats.

To export a document in PDF, use the ASPxRichEdit.ExportToPdf method. Currently, the ASPxRichEdit cannot load or edit PDF documents.

Expanded Specificities of importing and exporting HTML documents

The ASPxRichEdit control does not operate with HTML data directly. Instead, an HTML document is parsed and transformed into an internal document model. Therefore, not every HTML tag can be converted into the corresponding document model element. When exporting a document to HTML, the conversion process runs again, resulting in a document that is different from the original HTML document.

The supported HTML tags are listed in the HTML Tag Interpretation article.

Expanded See Also

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