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)
PDF SDKPDF Signature APIc++ UsageText SignaturesVB6 Signature sampleSignature TypesPHP Signature SampleAloaha CustomSigner PluginModify signed PDFUniqueContainerNameSign PDF AttachmentsAloaha Commandline Signer (ACS)Interactive SignaturesExtract Signature CertificatesCertificate PropertiesSample CodeText StampsPDF AttachmentsImage 2 PDFPDF to Multipage TIFFAppend PDFInsert Blank PageRender ImageStamp PDF with PDFDraw PDF as LetterheadApply LetterheadPDF BackgroundsAdd NotesURL HotspotSecure PDF ViewerPDF OptimizerPDF Encryption APIPDF Printing APIPDF BookmarksPDF BarcodingMerge PDF DocumentsSample APIsResize PDFCrop PDF PagePDF InformationPDF2TXTNormalize PagesDirect PDF ConversionPDF Form Saver SDKSmart Card APIAloaha Web ServicesAloaha Print MonitorAloaha Remote ConfigurationWebDAVLDAP ClientProgramming Office MacrosIIS Event Sinks