How to add the time to a Digital Signature?

111 views
Skip to first unread message

Ryan

unread,
Mar 31, 2016, 1:44:12 PM3/31/16
to PDFTron PDFNet SDK
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);



Ryan

unread,
Oct 19, 2016, 12:33:00 PM10/19/16
to PDFTron PDFNet SDK
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];

Ryan

unread,
Apr 29, 2019, 6:31:23 PM4/29/19
to PDFTron PDFNet SDK
Ruby version

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

Reply all
Reply to author
Forward
0 new messages