How to add the time to a Digital Signature?

Question:

How do add the time of signing to a digital signature I am creating?

Answer:

You would add the following code

`
Field sigField = /* your code */;
Obj sigDict = sigField.UseSignatureHandler(yourSigHandlerId);
pdftron.PDF.Date now = new pdftron.PDF.Date();
now.setCurrentTime();
Obj date_obj = sigDict.putString(“M”, “”);
now.update(date_obj);

`

Customer asked for this code in Objective-C

PTField* sigField = /* your code */; PTObj* sigDict = [sigField UseSignatureHandler: sigHandlerId]; PTDate* now = [[[PTDate alloc] init] autorelease]; [now setCurrentTime]; PTObj* date_obj = [sigDict PutString: @"M" value: @""]; [now Update: date_obj];

Ruby version

sigDict = sigField.UseSignatureHandler(sigHandlerId) now = PDFNetRuby::Date.new now.SetCurrentTime date_obj = sigDict.PutString('M', '') now.Update(date_obj)