Mombu the Computer Design Forum

Go Back   Mombu the Computer Design Forum > Computer_Design > JSObject returns wrong date. How can Iextract correct date from digital signature?
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 5th July 00:38
hal_underwood
External User
 
Posts: 1
Default JSObject returns wrong date. How can Iextract correct date from digital signature?



I'm trying to extract name and date from digital signatures by using JSObject in Excel VBA, but JSObject returns wrong date. Year, month, hour and minute are correct, but only day is incorrect.

Here is my code. I'm using Acrobat 8.1.3.
Please tell me what's wrong with this code and how I can extract correct date from digital signatures.

Public Sub sbTest()
Dim oApp As Acrobat.acroApp
Dim oPDDoc As Acrobat.AcroPDDoc
Dim jso As Object
Dim f As Object
Dim sig As Object
Dim strFileName As String

Set oApp = CreateObject("AcroExch.App")
Set oPDDoc = CreateObject("AcroExch.PDDoc")
strFileName = "C:\Test.pdf"

If (oPDDoc.Open(strFileName)) Then
Set jso = oPDDoc.GetJSObject
Set f = jso.getField("Signature1.0")
Set sig = f.signatureInfo()
Debug.Print sig.Name
Debug.Print sig.Date
End If
Call oPDDoc.Close
Call oApp.Exit
End Sub
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666