首页 > 解决方案 > 使用 ASP.Net C# 在数字签名 acrofield 中添加包含数字签名 PDF 的数据库中的图像

问题描述

我有一个签名板。我将签名垫值保存为数据库中的字节数组图像。我已在图像控件上显示此图像。我想在 PDF 中的数字签名控件上显示相同的图像。为了在 pdf 上显示内容,我在项目中使用了类文件。

下面我附上了代码来显示它:

public String Signature
{
    get
    {
        //if employee has not agreed to the Electronic Signature form - do not place signature on form.
        EmployeePortal.Models.NCI.NCIEntities ent = EmployeePortal.Models.ClsNCIUtil.GetNCIEntity(custid);
        using (ent)
        {
            EmployeePortal.Models.NCI.EmployeeSignature empSignature = ent.EmployeeSignatures.OrderByDescending(a => a.SignID).FirstOrDefault(a => a.EmployeeId == employee.EmployeeId);
            EmployeePortal.Models.NCI.EmployeeOnboarding empsign = ent.EmployeeOnboardings.FirstOrDefault(a => a.EmployeeId == employee.EmployeeId);
 
            if (empsign == null)
            {
                return null;
            }
            if (empsign.IAgree == true)
            {
                System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); 
                return encoding.GetString(empSignature.SignatureFile);
            }
            else
            {
                return null;
            }
        }
    }       
}

如何在数字签名 acrofield 上显示图像?

标签: c#

解决方案


推荐阅读