Back to Devexpress

DefaultWebDocumentViewerContainer.EnablePassingExportOptionsPasswordsToClient() Method

xtrareports-devexpress-dot-xtrareports-dot-web-dot-webdocumentviewer-dot-defaultwebdocumentviewercontainer-7f0d6b7f.md

latest2.8 KB
Original Source

DefaultWebDocumentViewerContainer.EnablePassingExportOptionsPasswordsToClient() Method

Enables passing PDF/Excel passwords specified in the Report Designer to the Web Document Viewer.

Namespace : DevExpress.XtraReports.Web.WebDocumentViewer

Assembly : DevExpress.XtraReports.v25.2.Web.dll

NuGet Package : DevExpress.Web.Reporting.Common

Declaration

csharp
public static void EnablePassingExportOptionsPasswordsToClient()
vb
Public Shared Sub EnablePassingExportOptionsPasswordsToClient

Remarks

For security reasons, PDF/Excel passwords specified in the Report Designer are not exposed in the Web Document Viewer. During the export process, the Document Viewer uses passwords specified in its Export Options tab.

If you fully trust your users and environments, you can enable passing these passwords to the Web Document Viewer. To do this, call the EnablePassingExportOptionsPasswordsToClient method at the application startup.

csharp
using DevExpress.XtraReports.Web.WebDocumentViewer;
// ...

protected void Application_Start(object sender, System.EventArgs e) {
    // ...
    DefaultWebDocumentViewerContainer.EnablePassingExportOptionsPasswordsToClient();
}
vb
Imports DevExpress.XtraReports.Web.WebDocumentViewer
' ...

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
    ' ...
    DefaultWebDocumentViewerContainer.EnablePassingExportOptionsPasswordsToClient()
End Sub

Review the following help topic section for more information: Protect Sensitive Information.

See Also

DefaultWebDocumentViewerContainer Class

DefaultWebDocumentViewerContainer Members

DevExpress.XtraReports.Web.WebDocumentViewer Namespace