Extract Signature Certificates

Sometimes it is import to know if a document is signed. To find out if a document contains a mathematically correct signature please use the following code:

DIM PDF

set PDF = createobject("aloahapdf.edit")

    msgbox PDF.is_signed(cstr("c:\inputpdf.pdf"))

set PDF = nothing



Even more important than just knowing if a document is signed it is to know WHO signed it. With the following example it is possible to extract all certificate chains of all mathematically correct signatures. Those chains can then subsequently used to do revocation checks etc.

Please note that this API requires an enterprise license!


Dim pdf As Object
Dim signers As Variant
Dim i As Long
Dim ii As Long
Dim signer As Object 
on error resume next

Set pdf = CreateObject("aloahapdf.edit")

signers = pdf.get_Signers_as_CapicomSigners("c:\0.pdf")

Set pdf = Nothing

Err.Clear
If UBound(signers) > 0 Then
  If Err.Number = 0 Then
    For i = 1 To UBound(signers)
      Set signer = Nothing
      Set signer = signers(i).signers
      If signer.Count > 0 Then
        For ii = 1 To signer.Count
          MsgBox signer(ii).certificate.subjectname
        Next ii
     End If
    Next i
  End If
End If



Company
Contact Person  
E-Mail
Telephone
Fax
Comment:

Please enter the code shown on the left in the following field: (This is to prevent automatic spammers)


Home / Knowledge Base / PDF SDK / PDF Signature API / Extract Signature Certificates
create PDF Software

Extract Signature Certificates

Any questions?
Aloaha Software - Extract Signature Certificates
ProductsKnowledge BaseShopSupportPress
Deutsche VersionEnglish version