SignatureDigitalIDPassword プロパティ

電子署名のためのデジタルIDファイルのパスワードを設定する。

文字列型 (書込みのみ)

注意点

PrinterSetting またはPDFSetting からの電子署名を有効にしている場合、有効なパスワードをこのプロパティで設定しなければなりません。パスワードはデジタルIDファイルを作成中に設定したものになります。

使用例


Private oPrinter As easyPDFPrinter.Printer

' "WithEvents"キーワードで変数を宣言します

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



    ' デジタルIDを作成します (デジタルIDを持っていない場合にのみこれを実行してください)

    oPDFSetting.SignatureCreateDigitalID "C:\my_digital_id.pfx",  _

                                         "password_here", _

                                         "John Smith", _

                                         "US", _

                                         "Organization Name", _

                                         "Organization Unit", _

                                         "My Email Address", _

                                         PRN_SIG_KEYLEN_1024



    ' 電子署名を有効にします

    oPDFSetting.Signature = True



    ' デジタルIDファイルを設定します

    oPDFSetting.SignatureDigitalIDFile = "C:\my_digital_id.pfx"



    ' 署名の画層を挿入します

    oPDFSetting.SignatureImage = True

    oPDFSetting.SignatureImageFile = "C:\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"



    ' デジタルIDパスワードを設定します

    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.7")

    Set oMonitor = oPrinter.PrinterMonitor

End Sub