Skip to main content
All docs
V18.2

ASPxClientWebDocumentViewer.Print(Int32) Method

Prints the document’s page with the specified index.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll

Declaration

public void Print(
    int pageIndex
)

Parameters

Name Type Description
pageIndex Int32

An index of the page to be printed.

Remarks

This method prints only one document page with the specified index. You can also use another overload of the Print method to print the entire document.

The printing functionality of the Web Document Viewer is based on rendering the report in PDF with special settings and invoking the PDF plug-in’s Print dialog.

After the Print method is called, the Document Viewer tries to use the PDF plug-in of the web browser to print. 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.
  • 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.

For more information, refer to the Print Overview document.

See Also