The requested page is not available for the requested platform. You are viewing the content for Default platform.

Document Viewer Requirements and Limitations

  • 4 min to read

Document Viewer Requirements

Install Script Files

The following script files should be installed on the client web browser to run the Document Viewer:

You should download and place all JavaScript files into your application's Scripts folder, set the paths to these libraries in the src attribute, and put the CSS files into the Content folder. You can also use NuGet to download and install these files automatically.

To include these script files in a client application, do one of the following:

  • Automatic Integration

    Include these client-side libraries on the web page automatically by adding the "resources" section to the application's Web.config file, as shown below.

    <devExpress>
        <!-- ... -->
        <resources>
            <add type="ThirdParty" />
            <add type="DevExtreme" />
        </resources>
    </devExpress>
    
  • Manual Integration

    To avoid automatic loading of any libraries by a control (that is, when such libraries are already referenced on the web page), do the following:

    • Declare an empty "resources" section in the Web.config file.

      <resources>
      </resources>
      
    • Manually attach DevExtreme resources and the required third-party libraries to the web page.

      <html>
      <head>
          <script src="Scripts/jquery-3.3.1.js" type="text/javascript"></script>
          <script src="Scripts/jquery-ui-1.12.1.custom.min.js" type="text/javascript"></script>
          <script src="Scripts/knockout-3.4.2.js" type="text/javascript"></script>
      
          <link href="Content/themes/base/jquery-ui.css" type="text/css" rel="Stylesheet" />
          ...
      </head>
      ...
      </html>
      
    Note

    Deleting the DevExpress "resources" section from the Web.config file enables the default behavior (with automatic loading only of DevExtreme, without adding third-party libraries).

    To learn more about this configuration, see Embedding Third-Party Libraries.

For a list of web browsers supported by the Document Viewer, refer to the following document: Supported Browsers.

Register httpHandlers

For the Document Viewer to work correctly, the ASPxHttpHandlerModule (DXXRDV.axd) should be registered in the web.config file as a module for resource processing and as a handler for data processing.

The ASPxHttpHandlerModule is automatically registered in this file in the following cases:

  • When you create an application with reporting controls using DevExpress project templates;
  • When you have the Document Viewer in markup and switch to the Design tab in Visual Studio.

You can also register ASPxHttpHandlerModule manually, for example, when you create the Document Viewer programmatically. Insert the module registration in the system.web/httpModules and system.webServer/modules configuration sections, and add the handler registration to the system.web/httpHandlers and system.webServer/handlers sections.

<system.web>
...
  <httpHandlers>
    ...
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
         verb="GET,POST" path="DXXRDV.axd" validate="false" />
  </httpHandlers>  
  <httpModules>
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
  </httpModules>
</system.web>
<system.webServer>
  <handlers>
    ...
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" 
         verb="GET,POST" path="DXXRDV.axd" name="ASPxWebDocumentViewerHandlerModule" preCondition="integratedMode" />
  </handlers>
  <modules runAllManagedModulesForAllRequests="true">
    <add type="DevExpress.Web.ASPxHttpHandlerModule, DevExpress.Web.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
  </modules>
</system.webServer>

When rendering, the Document Viewer checks the resulting configuration for the corresponding handler's presence. If this handler is not registered, the following error appears:

"The DXXRDV.axd handler is not registered in the web.config (section: system.webServer/handlers). To disable web.config validation, use the DevExpress.XtraReports.Web.ASPxWebDocumentViewer.DisableHttpHandlerValidation property."

In specific cases, you may not need to use handlers and/or validate their registration:

  • When you do not use the standard handlers and process requests in your custom HTTP handlers;
  • When handlers are registered inside the <location> section, and it is impossible to perform automatic validation.

To disable the handler validation, set the Document Viewer's ASPxWebClientUIControl.DisableHttpHandlerValidation property to true.

protected void Page_Load(object sender, EventArgs e) {
    ASPxWebDocumentViewer1.DisableHttpHandlerValidation = true;
}

Document Viewer Limitations

Consider the following limitations relating to the latest HTML5 Document Viewer version:

  • The following document formats do not support exporting a report to multiple files:

    You can only export the report to any of the above-listed formats as a single file.

  • To be able to print the report, the HTML5 Document Viewer first converts it to PDF, which requires that the web browser supports PDF printing.
  • At present, the HTML5 Document Viewer does not meet all the requirements of accessibility compliance.