J
Jennifer D'Cruz
Guest
I have a signature pad. I saved signature pad value as byte array image in database. I have displayed this image on image control. I wanted to display same image on Digital Signature control in Pdf.
To display content on pdf i have used class file in my project. Below i have attached code to display signature image. below code is not displaying signature image.
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);
//SHA1 mySha1 = new SHA1CryptoServiceProvider();
//byte[] hash = mySha1.ComputeHash(empSignature.SignatureFile);
return encoding.GetString(empSignature.SignatureFile);
}
else
{
return null;
}
}
}
}
How can i display image on digital signature acrofield?
Please help me out as soon as possible.
Continue reading...
To display content on pdf i have used class file in my project. Below i have attached code to display signature image. below code is not displaying signature image.
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);
//SHA1 mySha1 = new SHA1CryptoServiceProvider();
//byte[] hash = mySha1.ComputeHash(empSignature.SignatureFile);
return encoding.GetString(empSignature.SignatureFile);
}
else
{
return null;
}
}
}
}
How can i display image on digital signature acrofield?
Please help me out as soon as possible.
Continue reading...