Different PDF Signature Types

Aloaha supports a variety of different PDF Signature Types. It supports embedded PKCS #1, PKCS #7 as normal and incremental signatures. Furthermore signatures can be text, transparent, invisible and JPG 24 Bit!

Below you find a sample VB example for text, transparent, invisible and image signatures.

Evaluation Key required!

Private Sub Command1_Click()

Dim image As String
Dim invisible As Boolean
Dim i As Long
Command1.Enabled = False

For i = 1 To 4

If i = 1 Then
image = “”
invisible = False
End If

If i = 2 Then
image = “”
invisible = True
End If

If i = 3 Then
image = “Digitalno podpisal @@signature@@@@lf@@dne @@date@@@@lf@@.”
invisible = False
End If

If i = 4 Then
image = “c:\siav.jpg”
invisible = False
End If

Call AloahaDigSign(“c:\untitled.pdf”, “c:\output” + CStr(i) + “.pdf”, invisible, image)

Next i
Command1.Enabled = True

End Sub
Private Sub AloahaDigSign(ByVal inFileName As String, ByVal outFilename As String, ByVal invisible As Boolean, ByVal pathImage As String)
Dim pdfEdit As Object
Dim CertSerNum As String

‘Unique Container Name or Serial Number of Certificate to be used.
‘Please make sure the right store is choosen in signature settings dialog
‘This sample uses native Reader 0 (first available card reader)
CertSerNum = “0”

Set pdfEdit = CreateObject(“aloahapdf.edit”)

If pathImage = “” Then

If invisible = True Then
pdfEdit.signaturecontent = “”
Else
‘works only if in settings incremental signatures have been disabled
‘HKCU\Software\Aloaha\pdf\ForceIncrementalSignature = 0
pdfEdit.signaturecontent = ” ”
End If

Else

If Mid(pathImage, 2, 1) <> “:” Then
‘works only if in settings incremental signatures have been disabled
‘HKCU\Software\Aloaha\pdf\ForceIncrementalSignature = 0
pdfEdit.signaturecontent = pathImage
Else
pdfEdit.signaturecontent = “”
End If

End If

Call pdfEdit.sign_pdf_file(inFileName, outFilename, 0, 0, 11, 8, 21, 2, “Overjam digitalno verzijo”, “Koper”, CertSerNum, pathImage)

Set pdfEdit = Nothing
End Sub