All docs
V19.2
19.2
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Print Documents

  • 2 min to read

End-users can print out the current document using a built-in UI command or the standard keyboard shortcut (CTRL+P). To disable this functionality, set the control's Printing property to Disabled or Hidden.

ASPxRichEdit_Printing

To print out a document from code, use the filePrint Command.

 richEdit.commands.filePrint.execute();

In both cases, the control leverages the browser's Print dialog to complete the task.

The ASPxRichEdit control supports two print modes:

  • Server PDF Mode (ServerPdf),

  • Client HTML Mode (ClientHtml).

Server PDF Printing (default)

ASPxRichEdit requests the printed document from the server. The server exports the document to a PDF file and sends the result to the client. On the client, the control invokes the Print dialog for the PDF file.

Note

The printed document's layout may differ from what you see on screen.

Client HTML Printing

ASPxRichEdit renders the current document’s markup into a blank browser tab and calls the browser's Print dialog. This strategy produces a WYSIWYG output.

To enable the Client HTML Mode set the PrintMode property to ClientHtml.

ASPxRichEdit.Settings.Printing.PrintMode = PrintMode.ClientHtml;
Note
  • The client mode can be slower than server mode when you print large documents.
  • To prevent content offset, ensure that the same page format is set in both the document and the printer.