Professional Web Applications Themes

Digital Signatures from VB - Adobe Acrobat SDK

Hello, I am trying to digitally sign a bunch of pdfs from LotusScript (it is VB6-like). Till now I am able to insert a signature field in a doent but not sign that field. My problem is I could not find a way to construct the required SignatureInfo object for the signatureSign function. Until now I tried to: - pass {password: "x" reason: "No reason", contactInfo: "mailmail.com"} This would result in a "Wrong argument type" error - create a custom type oInfo with members password,reason and so on, then dimming and populating a variable of that type and passing it ...

  1. #1

    Default Digital Signatures from VB

    Hello,

    I am trying to digitally sign a bunch of pdfs from LotusScript (it is VB6-like). Till now I am able to insert a signature field in a doent but not sign that field. My problem is I could not find a way to construct the required SignatureInfo object for the signatureSign function.
    Until now I tried to:

    - pass {password: "x" reason: "No reason", contactInfo: "mailmail.com"}
    This would result in a "Wrong argument type" error

    - create a custom type oInfo with members password,reason and so on, then dimming and populating a variable of that type and passing it to the signatureSign. Would return me a Type mismatch error.

    - calling the signatureInfo method of an empty signature field thus obtaining a "valid" SignatureInfo object, but when I try to assaing some values to a property I get "PASSWORD is not an instance member" error. This happens with reason, name or any other property

    - calling the signatureInfo method of an already signed field. I could read the name or reason properties, but trying to overwrite the password prop would result again in "PASSWORD is not an instance member" error.

    The only way I would not get an error, but Acrobat would still silently fail to sign the field, is if I pass an array to the signatureSign function. But since I have no idea in what order the SigInfo object expects its properties, couldnt test this scenario further.

    Like I said LotusScript is vb-like, so any vb or vb.net example of the signatureSign function, or usage of any other generic JS object, would be extremely halpful!

    Thanks

    P.S.: Acrobat Version is 8.1 Prof.
    Ventsislav_Hristov@adobeforums.com Guest

  2. #2

    Default Re: Digital Signatures from VB

    The BasicIacJsoVB sample included in the SDK is a basic example of using the JSObject in VB.NET.
    PDL@adobeforums.com Guest

  3. #3

    Default Re: Digital Signatures from VB

    Thanks for your reply PDL. After two days research it did point me in the right way.
    For everyone having the same problem here is my solution:
    You wont be able to sign a doent using only vb code, since, for example, the securityHandler.login function is restricted and may be executed only "inside" acrobat (i guess reading the doentation carefully does help!). So one solution would be to create a trusted function in acrobat's javascript folder and use that from vb with fields.ExecuteThisJavaScript("myProtectedFunction( a,b,c,d,...);").
    I guess executing a menu item would also work, but i couldnt find a way to pass any arguments this way.

    Still no idea on how to construct those javascript generic objects in vb, so any ideas would be greatly appreseated
    Ventsislav_Hristov@adobeforums.com Guest

  4. #4

    Default Re: Digital Signatures from VB



    Still no idea on how to construct those javascript generic objects in
    vb, so any ideas would be greatly appreseated




    Could you be more specific with "those javascript generic objects in vb"? The sample I pointed you to shows you exactly how to execute Acrobat JavaScript from VB - is this not what you need to do?
    PDL@adobeforums.com Guest

Similar Threads

  1. Digital Signatures
    By yiyun0918@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 5
    Last Post: January 8th, 08:17 PM
  2. Formatting of digital signatures
    By Robert_Nowlan@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 0
    Last Post: April 6th, 12:07 AM
  3. Digital Signatures for Acrobat 5
    By Miriam_Konstam@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 5
    Last Post: May 10th, 08:00 AM
  4. Digital Ink Signatures
    By Anthony_Farson@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 3
    Last Post: May 3rd, 11:10 AM
  5. Multiple Digital Signatures
    By Mary_McK@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 3
    Last Post: April 28th, 02:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139