Create a Report with a Visual PDF Signature in the Visual Studio Report Designer
- 3 minutes to read
This tutorial describes how to create a report with a visual PDF signature.
- View Online Demo.
- View Desktop Demo (the DevExpress Demo Center should be installed).
Tip
To get started with this tutorial, create a new project or open an existing project, then add a new blank report to the project.
Create a Report Layout
Drop the XRRichText control from the DX.24.1: Report Controls Toolbox tab onto the Detail band.
Double-click the control and insert text of the DevExpress Website Terms of Use.
Right-click the design surface. Select Insert Band / ReportFooter from the context menu. Enable the footer band‘s PrintAtBottom property.
Drop the XRPdfSignature control from the DX.24.1: Report Controls Toolbox tab onto the Report Footer band.
Place the XRLabel control to the left of the XRPdfSignature and add the following text: I have read and accept this Website Terms of Use statement.
Click the Preview tab to see the result.
Export and Sign the Report
In Preview, click Export Document and select PDF File.
In the invoked PDF Export Options dialog, click the Digital Signature option’s ellipsis button.
In the invoked Signature Options dialog, choose a certificate and specify signature details.
Save and open the document to see the final result.
Tip
All signature fields are displayed in the exported document. You can also hide unnecessary fields. See the XRPdfSignature control’s description for details on how to configure the fields.
To sign the exported PDF document in the Web Document Viewer, use one of the following options:
- Sign the document in the Web Document Viewer’s UI
- Implement the IPdfSignatureOptionsProviderAsync interface to register available signature options. Select a signature from the Signature drop-down list in the Export to PDF section.
- Customize the exported document
- Override the CustomizeExportDocumentOnFinish method to retrieve and sign the exported document.
The following example shows how to sign a document exported to PDF:
PDF Signature Control Limitation
- The XRPdfSignature control is not exported to non-PDF formats. A placeholder is added to exported documents instead.
Create a Report with a Visual PDF Signature in the End-User Report Designer
Tutorials that explain how to create different reports in EUD Report Designers for WinForms and Web are included in the End-User Documentation online help section: