Using digitalSignatureobject in report

Hello boys

I am in doubt about how to use the digitalSignatureobject component in a report, I put the object in the report but could not figure out how to feed it with the certificate data so that the digital signature already appears when it is exported to PDF.

Click the link below to see which component I'm talking about

http://prntscr.com/oaby48

Comments

  • Hello!

    Placing a DigitalSignatureObject in a .frx file creates a visual signature area on the page, while the certificate (.pfx), password, and signature metadata are passed via the PDFExport object’s properties before export:

    using var pdf = new FastReport.Export.Pdf.PDFExport
    {
    IsDigitalSignEnable = true,
    DigitalSignCertificate = new System.Security.Cryptography.X509Certificates.X509Certificate2(“cert.pfx”, “password”),
    // or DigitalSignCertificatePath = “cert.pfx”, DigitalSignCertificatePassword = “password”,
    DigitalSignReason = “Approved”,
    DigitalSignLocation = “Office”
    };
    report.Prepare();
    report.Export(pdf, “signed.pdf”);
    
This discussion has been closed.