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

Print Overview

  • 3 minutes to read

To publish report documents on the web, you can use the Web Document Viewer, whose server-side functionality is provided by the ASPxWebDocumentViewer class. A server-side Document Viewer control hosted by a web application generates a final document in a representation suitable for being displayed in a web browser and passes it to the client to preview, navigate, export and/or print. The client-side functionality of these controls is provided by the ASPxClientWebDocumentViewer class.

This document provides information on printing reports from a client web browser.

Print in the Document Viewer

The Document Viewer supports pixel perfect document rendering, i.e., displays a report exactly as it will appear on paper. The printing functionality of this viewer is based on rendering the report in PDF with special settings and invoking the PDF plug-in’s Print dialog.

The ASPxClientWebDocumentViewer.Print method prints a report on the client side. This method can be triggered in the following cases.

  • When you click the Print button to print the entire report document or the Print Page button to print the currently active document page.

    HTML5DC_PrintButton

    HTML5DC_PrintPageButton

  • When executing a specific script on the client.

After the ASPxClientWebDocumentViewer.Print method is called, the HTML5 Document Viewer tries to use the PDF plug-in of the browser for printing. Depending on the plug-in detection result, there are two possible scenarios.

  • If the PDF plug-in is installed and enabled, its Print dialog is invoked. To print the document, specify the required settings in this dialog and click Print.

    EUD_HTML5DV_PrintDialog

  • If the PDF plug-in is disabled or is not installed, the Document Viewer exports the report document to a PDF file, and initiates its download instead of printing. The resulting PDF file contains a script that starts printing the document immediately after it is opened in a compatible viewer.

Install and Activate the Adobe Reader® plug-in

To download and install the Adobe Reader® plug-in, use the following link: http://get.adobe.com/reader/. No software other than the Adobe Reader® should be installed on a machine for printing purposes. After finishing the installation, the plug-in should automatically be enabled in appropriate web browsers. To learn how to manually setup your browser to use this plug-in, refer to the Display PDF in browser document. For the changes to take effect, you may need to close and reopen the browser.

Note that many modern web browsers include their own PDF plug-ins, which automatically replace the Adobe Reader® plug-in. If you need to revert to the Adobe plug-in, refer to the Configure browser to use the Adobe PDF plug-in document.

See Also