I created a sample project for signing a PDF document and setting signature properties like Reason and Location. I used the following sample implementation shown in the Getting Started with Digital Signature article:
int signatureFieldWidth = 200;
int signatureFieldHeight = 50;
int signaturePositionLeft = 10;
int signaturePositionTop = 10;
X509Certificate2 certificate = new X509Certificate2("..\\..\\..\\JohnDoe.pfx", "johndoe");
SignatureField pdfSignature = new SignatureField("SignatureField");
pdfSignature.Signature = new Signature(certificate);
pdfSignature.Signature.Properties.Reason = "I am the author of this document.";
pdfSignature.Signature.Properties.Location = "My City, My Country";
Form pdfForm = new Form();
pdfForm.FormSource = new FormSource();
pdfForm.FormSource.Size = new Size(signatureFieldWidth, signatureFieldHeight);
FixedContentEditor editor = new FixedContentEditor(pdfForm.FormSource);
pdfForm.Position.Translate(signaturePositionLeft, signaturePositionTop);
editor.DrawText($"{certificate.GetNameInfo(X509NameType.SimpleName, false)}{DateTime.Now.ToString("yyyy.MM.dd HH:mm")}");
SignatureWidget signatureWidget = pdfSignature.Widgets.AddWidget();
signatureWidget.Content.NormalContentSource = pdfForm.FormSource;
signatureWidget.Rect = new Rect(signaturePositionLeft, signaturePositionTop, signatureFieldWidth, signatureFieldHeight);
signatureWidget.RecalculateContent();
RadFixedDocument document = new RadFixedDocument();
RadFixedPage pdfPage = document.Pages.AddPage();
pdfPage.Annotations.Add(signatureWidget);
FixedContentEditor pageEditor = new FixedContentEditor(pdfPage);
pageEditor.Position.Translate(signaturePositionLeft, signaturePositionTop);
pageEditor.DrawForm(pdfForm.FormSource);
document.AcroForm.FormFields.Add(pdfSignature);
signatureWidget.RecalculateContent();
string signedDocumentFilePath = "..\\..\\..\\signed.pdf";
File.Delete(signedDocumentFilePath);
using (Stream output = new FileStream(signedDocumentFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider().Export(document, output, TimeSpan.FromSeconds(10));
}
var psi = new ProcessStartInfo()
{
FileName = signedDocumentFilePath,
UseShellExecute = true
};
Process.Start(psi);
On my end, examining the result file and signature in Adobe Acrobat, I am able to see the set properties:
I am attaching the project for your disposal. Feel free to examine it and compare implementations. Let me know if there is something different on your end that might affect the results you are seeing or if I'm missing something. If you can, please provide your implementation instead so I can test and investigate it.
NOTE: Please keep in mind that this is a public Q&A forum thread, so any resources shared here will be publicly accessible. Please avoid sharing confidential, sensitive, or personally identifiable information.