BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

SignatureDigitalIDPassword Property

Sets digital ID file password for digital signature.

Type

String (write-only)

Remarks

If you enabled digital signature from either PrinterSetting or PDFSetting, you must set this property with a valid password. Password is the one you specified during digital ID file creation.

Example Usage

Private oPrinter As easyPDFPrinter.Printer
' Declare variable with "WithEvents" keyword
Private WithEvents oMonitor As easyPDFPrinter.PrinterMonitor

Private Function oMonitor_OnPrinterInit(ByVal uID As Long, ByVal JobInfo As easyPDFPrinter.PrintJobInfo) As Long

    Set oPDFSetting = JobInfo.PDFSetting

    ' Create a digital ID (do this only if you do not have digital ID already)
    oPDFSetting.SignatureCreateDigitalID "C:\test\my_digital_id.pfx",  _
                                         "password_here", _
                                         "John Smith", _
                                         "US", _
                                         "Organization Name", _
                                         "Organization Unit", _
                                         "My Email Address", _
                                         PRN_SIG_KEYLEN_1024

    ' Enable digital signature
    oPDFSetting.Signature = True

    ' Set digital ID file
    oPDFSetting.SignatureDigitalIDFile = "C:\test\my_digital_id.pfx"

    ' Insert an image which will visually represent a signature
    oPDFSetting.SignatureImage = True
    oPDFSetting.SignatureImageFile = "C:\test\signature.bmp"
    oPDFSetting.SignatureImagePosLeft = 1.0 ' 1.0 inch from left
    oPDFSetting.SignatureImagePosTop = 1.0 ' 1.0 inch from top
    oPDFSetting.SignatureImageZoom = 100 ' percent
    oPDFSetting.SignatureInfoContact = "Contact info"
    oPDFSetting.SignatureInfoLocation = "Location info"
    oPDFSetting.SignatureInfoPurpose = "Purpose info"

    ' Set digital ID password
    oMonitor.SignatureDigitalIDPassword = "password_here"

    ' ...

    oMonitor_OnPrinterInit = PRN_MON_CONTINUE_CONVERSION
End Function

Private Function oMonitor_OnPrinterUpdate(ByVal uID As Long, ByVal JobInfo As easyPDFPrinter.PrintJobInfo) As Long
    ' ...
    oMonitor_OnPrinterUpdate = PRN_MON_CONTINUE_CONVERSION
End Function

Private Function oMonitor_OnPrinterStart(ByVal uID As Long) As Long
    ' ...
    oMonitor_OnPrinterStart = PRN_MON_CONTINUE_CONVERSION
End Function

Private Function oMonitor_OnPageStart(ByVal uID As Long, ByVal PageNumber As Long) As Long
    ' ...
    oMonitor_OnPageStart = PRN_MON_CONTINUE_CONVERSION
End Function

Private Function oMonitor_OnPrinterEnd(ByVal uID As Long, ByVal Result As prnPrinterResult) As Long
    ' ...
    oMonitor_OnPrinterEnd = PRN_MON_CONTINUE_CONVERSION
End Function

' ...

Private Sub Init()
    Set oPrinter = CreateObject("easyPDF.Printer.8")
    Set oMonitor = oPrinter.PrinterMonitor
End Sub