We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Digitally sign PDF file - Reason / Location undefined


I am using the example of the C# api to digitally sign a pdf:


In the pdf generated i got a ‘undefined’ printed on the pdf under fields Reason and Location.

And in the example we are filling fields for reason and location in the signature.Certify method.

It seams these fields are being ignored? Or how that fields in image should be fill?

I am using

Framework 2.0 .NET / and from the Chat support i already replaced the dll from 10.5.1 to 10.9.0.

In both return undefined on the output pdf.

Hi Marco,

Thanks for your inquiry. As per referenced documentation you are using DocMDPSignature object for signing the document and this object uses details from signature certificate file(PFX). So either please define the properties in certificate file or you can use your customer details using Sign() method instead Certify() as following. Hopefully it will help you to accomplish the task.

PKCS7 pkcs = new PKCS7(myDir + “temp.pfx”,
“password”); // Use PKCS7/PKCS7Detached objects<o:p></o:p>

//DocMDPSignature docMdpSignature = new DocMDPSignature(pkcs, DocMDPAccessPermissions.FillingInForms);

System.Drawing.Rectangle rect = new System.Drawing.Rectangle(100, 100, 200, 100);

//set signature appearance

signature.SignatureAppearance = myDir+"imgLogoPdf1.png";

//create any of the three signature types

//signature.Certify(1, "Signature Reason", "Contact", "Location", true, rect, docMdpSignature);

signature.Sign(1, "Signature Reason", "Contact", "Location", true, rect, pkcs);

//save output PDF file


Please feel free to contact us for any further assistance.

Best Regards,
hi, I hope don't display detail on my signature field(ex:Reason / Location / Signed by),How can I do? thanks! (it's show undefined when field null)
Hi there,

Thanks for your inquiry. I am afraid currently we can not hide signature Reason,Contact and Location from signature. We have already logged a ticket PDFNET-41358 for further investigation and resolution. We have linked this thread to the issue id and will keep you updated about the issue resolution progress.

We are sorry for the inconvenience.

Best Regards,

Hi there,

Thanks for your patience. Please note you can hide Signature properties using ShowProperties property of respective Certificate class object as following. Sample code snippet will help you to accomplish the task.

PKCS7 pkcs = new PKCS7(pbxFile, “test”);
// Use PKCS7/PKCS7Detached objects<o:p></o:p>

pkcs.ShowProperties = false; // Hide properties

Please feel free to contact us for any further assistance.

Best Regards,