Giter Club home page Giter Club logo

reporting-asp-net-core-sign-pdf-on-export's Introduction

Reporting for ASP.NET Core - Use the Web Document Viewer to Sign an Exported PDF Document

This example demonstrates how to sign an exported PDF document.

Add Signature Capabilities to the Document Viewer's UI

File: CustomPdfSignatureOptionsProviderAsync.cs

To pass a collection of signatures to the Web Document Viewer, implement the IPdfSignatureOptionsProviderAsync interface.

In this example, the CustomPdfSignatureOptionsProviderAsync class implements the IPdfSignatureOptionsProviderAsync interface. The GetAvailableOptionsAsync method returns the dictionary of signature identifiers and PdfSignatureOptions objects. This dictionary defines signatures available in the Web Document Viewer.

Select a signature to sign the exported document from the Signature drop down list in the PDF Export Options section:

Signature Options

The selected signature is used to digitally sign the exported PDF document. The XRPdfSignature control adds a visual signature:

Signed PDF Document

Customize the Exported Document

File: CustomViewerOperationLogger.cs

The example uses the PDF Document API to add a digital signature to a PDF document. Override the CustomizeExportDocumentOnFinish method to retrieve and modify the exported document.

Note: If you use this method to sign a PDF document, the XRPdfSignature control doesn't add a visual signature representation. To confirm that the document is signed, open it in the PDF editor.

The CustomViewerOperationLogger service inherits the WebDocumentViewerOperationLogger class. The CustomizeExportDocumentOnFinish method creates a PKCS#7 signature with a certificate and a password specified in the object constructor. PdfSignatureBuilder properties allow you to specify the signer’s name, location, contact information, and the reason for signing.

To sign the exported document, call the PdfDocumentSigner.SaveDocument method and pass the created PdfSignatureBuilder object as a parameter.

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

reporting-asp-net-core-sign-pdf-on-export's People

Contributors

andreylepikhov avatar devexpressexamplebot avatar pollyndos avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.