How to add the time to a Digital Signature?


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


You would add the following code

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


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 = now.SetCurrentTime date_obj = sigDict.PutString('M', '') now.Update(date_obj)