Hi… How do you remove or replace “Signature Reason”, “Contact”, “Location”?
I just want to use a single line “Signed By : John Smith”
public static void SignWithTimeStampServer()
{
using (Document document = new Document(System.IO.Path.Combine(_dataDir,"SimpleResume.pdf")))
{
using (PdfFileSignature signature = new PdfFileSignature(document))
{
PKCS7 pkcs = new PKCS7(@"C:\Keys\test.pfx", "Start2020");
TimestampSettings timestampSettings = new TimestampSettings("https://freetsa.org/tsr", string.Empty); // User/Password can be omitted
pkcs.TimestampSettings = timestampSettings;
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(100, 100, 200, 100);
// Create any of the three signature types
signature.Sign(1, "Signature Reason", "Contact", "Location", true, rect, pkcs);
// Save output PDF file
signature.Save(System.IO.Path.Combine(_dataDir, "DigitallySignWithTimeStamp_out.pdf"));
}
}
}