Posted by a ceTe Software moderator
Hello Niraj,
Yes, you can achieve your requirement without any problem using our DynamicPDF for .NET product. You will need to hide the right panel text of the signature and reset the desired string to it using CustomMessage property. Below is the sample code for it.
Document document = new Document();
Page page = new Page();
Signature signature = new Signature("SigField", 10, 10, 250, 100);
page.Elements.Add(signature);
document.Pages.Add(page);
Certificate certificate = new Certificate(@"C:Data/JohnDoe.pfx", "dynamicpdf");
StringBuilder outputString = new StringBuilder();
outputString.Append("Digitally signed by ");
outputString.Append(certificate.SubjectName);
outputString.Append("DN: ");
outputString.Append(certificate.Subject);
outputString.Append("Date: ");
DateTime dt = DateTime.Now;
DateTime udt = dt.ToUniversalTime();
string dateStringFormat = DateTime.Now.ToString("MMMM dd,yyyy HH:mm:ss tt 'IST' ");
outputString.Append(dateStringFormat);
outputString.Append("Message added Manually");
signature.RightPanel.HideAllText();
signature.RightPanel.CustomMessage = outputString.ToString();
document.Sign("SigField", certificate);
document.Draw(@"C:\MyDocument.pdf");
Thanks,
ceTe Software Support Team.