PDF Text Signatures

Even though the most common signatures are Image signatures it also possible with Aloaha PDF SDK to create text signatures.

Please have a look at the example below.

‘This sample script demonstrates how to sign PDF Document
‘with Adobe.PPKMS signatures
‘Copyright 2015 Aloaha Limited
‘Redistribution without permission not allowed
‘Signature API only enabled in Enterprise Pro Edition

Dim pdf
Dim reason
Dim location
Dim infile
Dim outfile
Dim cert

reason = “I created this document”
location = “I am in the office”

‘set unique container name of certificate. serialnumber can be also used.
cert =”6e3f233ba3664e4f733a981c4b461016_d47eb964-b63d-4abb-a9f3-7d692cd54574″

‘set file names
infile = “c:\pdf\input.pdf”
outfile = “c:\pdf\output.pdf”

‘create object
Set pdf = CreateObject(“aloahapdf.edit”)

‘set the text content of the signature.
‘Empty string creates a invisible signature
‘pdf.signaturecontent=””

‘A string with some spaces as content create a
‘transparent signature. (if incremental signature is disabled)
‘pdf.signaturecontent=” ”

pdf.signaturecontent=”Signed at@@lf@@@@date@@@@lf@@with @@signature@@’s digital certificate.@@lf@@No further signature necessary.”

‘please note that position is set to 0,0,0,0 – registry settings will be used!

Call pdf.sign_pdf_file(CStr(infile), CStr(outfile), 0, 0, 0, 0, 0, 0, CStr(reason), CStr(location), CStr(cert), “”)

Set pdf = nothing