Dim pdf 'will hold the Aloaha Object Dim infile 'Variable to store the original PDF filename Dim outfile 'Variable to store the filename of the new file. Can be the same as infile to overwrite infile Dim image 'Variable to store the path to a JPG Image to be included in the signature Dim cert 'Holds the UniqueContainerName or SerialNumber of the Certificate 'to be used. The UniquieContainerName of a Certificate can be found 'with the tool ChooseCertificate.exe. The SerialNumber could be found 'with certmgr.msc Dim reason 'signature reason Dim location 'signer location Dim pageheight 'define pageheight - 0 for auto detect Dim pagewidth 'define pagewidth - 0 or auto detect Dim px1 'X of upper left corner of signature box in percent Dim py1 'Y of upper left corner of signature box in percent Dim px2 'X of lower right corner of signature box in percent Dim py2 'Y of lower right corner of signature box in percent cert = "90 40 0c b5 2c f4 3c 1a f7 b0" infile = "c:\pdf\Aloaha PDF Signature SDK.pdf" outfile = "c:\pdf\Aloaha PDF Signature SDK.pdf" reason = "I approve this document" location = "CEO's Office" pageheight = 842 'for A4 format pagewidth = 595 'for A4 format px1 = 85 py1 = 10 px2 = 95 py2 = 05 Set pdf = CreateObject("aloahapdf.edit") Image = pdf.aloahapath+"jpg\george1.jpg" 'choose image to be included pdf.currentpage = 1 'set page to be signed 'Sign the specified PDF File. Other Interfaces like signing of PDF Bytestream 'available on request if pdf.sign_pdf_file(CStr(infile), CStr(outfile), CLng(pagewidth), CLng(pageheight), _ CLng(px1), CLng(py1), CLng(px2), CLng(py2), cstr(reason), cstr(location), _ cstr(cert), CStr(image)) = true then msgbox "PDF Document signed!" else msgbox "PDF Document could not be signed - maybe locked/opened by another application" end if Set pdf = nothing 'onload Aloaha object