Javascript Code to List all Signature Fields in a PDF Document

Hi everybody,
I am doing a VB.NET application that apply a digital signature in a PDF document.
My VB.NET application invoke a javascript file that signs de document. It's working very well, but I need to pass the field name to place the signature, and this is not good!
I would like to list all the signature fields existing in my PDF file, is it possible do this with Javascript? I couldn't find in the Acrobat 8 SDK documentation.
I have installed Acrobat 8 Professional in my machine.
Thank you in advance!

Nobody knows?
Help me please!
I am reading something about a method called "event.target.name" that probably do what I need, but I couldn't use it. Am I in the right way? Any ideas?
Thanks!

Similar Messages

  • Digitally Sign All Signature Fields in the Active Document

    I have a script which will sign a single digital signature field by the field name.
    I need to revise the script so it will sign multiple/all signature fields in the active document without having to put the field name in the script, as the field names will vary with each document.
    Can anyone please advise how to modify the script to sign all fields in the active document regardless of the field name?
    function myOtherTrustedFunction()
    app.beginPriv();
    // Get and login to security handler
    var oSigHdlr = security.getHandler( "Adobe.PPKLite" );
    oSigHdlr.login( "123","/c/Documents and Settings/name/Application Data/Adobe/Acrobat/10.0/Security/FirstNameLastName.pfx");
    // Setup Signing Properties
    var chk = this.getField("Checked");
    if (chk != null) {
    // Apply Signature and save back to original file
    var bRtn = chk.signatureSign({oSig:oSigHdlr, bUI:false, oInfo:{password:"123"}});
    app.endPriv();
    Any assistance will be most appreciated.

    Thank you for your help, the script will now count only the signature fields which have not been signed.
    I have added the second part of the script to then sign all of the blank signature fields.
    The script is only signing one of the digital signature fields instead of all of the blank signature fields.
    Can you please advise how I can modify the script to sign all of the blank signature fields?
    var count = 0;
    for (var i = 0; i < numFields; i++) {
        // Get the current field object
        f = getField(getNthFieldName(i));
        // If it's a signature field and not already signed, increment counter
        if (f.type === "signature" && !f.value) {
            count++;
    var myEngine = security.getHandler( "Adobe.PPKLite" );
    myEngine.login( "123", c/Documents and Settings/name/Application Data/Adobe/Acrobat/10.0/Security/FirstNameLastName.pfx" );
    // Sign the field
    f.signatureSign( myEngine,{password: "123"});

  • How to get all signature fields in a .pdf from C#

    Does anyone have some sample code that shows how to "iterate" all signatures in a .pdf from C#? Using the SDK and the Javascipt object model I know how to sign a document but I can't figure out how to "get all the signatures". Basically I want to open a .pdf file and then (from C#) find out what persons currently have signed the document. I guess I need to iterate all signature fields and then get the SignatureInfo object, or?
    Anyone?
    Cheers,
    Calle

    I am afraid this don't help me. How do I get the "data" back to C#? Looping all fields in in JavaScript is probably "easy" but I simply can't figure out how to get access to the data from C#. Any one have a suggestion on the best approach?
    Thx,
    CJ

  • How to list all the Fields for an Active Directory Object

    How do I list all the fields that an Active Directory object contains? I know the most common ones, but would like to enumerate through all the fields and obtain the type of fields and their values...

    Here is my complete code - I only put snippets so that the post was not too huge...
    Option Explicit
    Const ADS_SCOPE_SUBTREE = 2
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim adoCommand, adoConnection, adoRecordSet
    Dim dtmDate, dtmValue
    Dim j
    Dim lngBias, lngBiasKey, lngHigh, lngLow, lngValue
    Dim objADObject, objClass, objDate, objFile, objFSO, objRootDSE, objShell
    Dim pathToScript
    Dim strAdsPath, strConfig, strDNSDomain, strHex, strItem, strProperty, strValue
    Dim strFilter, strQuery
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Wscript.Shell")
    pathToScript = objShell.CurrentDirectory
    Set objFile = objFSO.CreateTextFile(pathToScript & "\TestAD.csv")
    ' Determine Time Zone bias in local registry.
    ' This bias changes with Daylight Savings Time.
    lngBiasKey = objShell.RegRead("HKLM\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
    If (UCase(TypeName(lngBiasKey)) = "LONG") Then
    lngBias = lngBiasKey
    ElseIf (UCase(TypeName(lngBiasKey)) = "VARIANT()") Then
    lngBias = 0
    For j = 0 To UBound(lngBiasKey)
    lngBias = lngBias + (lngBiasKey(j) * 256^j)
    Next
    End If
    ' Determine configuration context and DNS domain from RootDSE object.
    Set objRootDSE = GetObject("LDAP://RootDSE")
    strConfig = objRootDSE.Get("configurationNamingContext")
    strDNSDomain = objRootDSE.Get("defaultNamingContext")
    Set adoCommand = CreateObject("ADODB.Command")
    Set adoConnection = CreateObject("ADODB.Connection")
    adoConnection.Provider = "ADsDSOObject"
    adoConnection.Open "Active Directory Provider"
    adoCommand.ActiveConnection = adoConnection
    adoCommand.CommandText = "SELECT * FROM 'LDAP://" & strDNSDomain & "'WHERE objectClass=user'"
    adoCommand.Properties("Page Size") = 1000
    adoCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
    Set adoRecordSet = adoCommand.Execute
    Set adoRecordSet = adoCommand.Execute
    adoRecordSet.MoveFirst
    Do Until adoRecordSet.EOF
    strAdsPath = adoRecordSet.Fields("ADsPath").Value
    ' Bind to Active Directory object specified.
    Set objADObject = GetObject(strAdsPath)
    Set objClass = GetObject(objADObject.Schema)
    ' Write which object is grabbed from AD
    objFile.Write(Replace(strAdsPath, ",", ";;;"))
    ' Enumerate mandatory object properties.
    For Each strProperty In objClass.MandatoryProperties
    On Error Resume Next
    strValue = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    On Error GoTo 0
    If (TypeName(strValue) = "String") Or (TypeName(strValue) = "Long") Or (TypeName(strValue) = "Date") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Byte()") Then
    strHex = OctetToHexStr(strValue)
    objFile.Write("," & strProperty & "|||" & CStr(strHex))
    ElseIf (TypeName(strValue) = "Variant()") Then
    For Each strItem In strValue
    On Error Resume Next
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strItem), ",", ";;;"))
    If (Err.Number <> 0) Then
    On Error GoTo 0
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    On Error GoTo 0
    Next
    ElseIf (TypeName(strValue) = "Boolean") Then
    objFile.Write("," & strProperty & "|||" & CBool(strValue))
    Else
    objFile.Write("," & strProperty & "|||Type:" & TypeName(strValue))
    End If
    Else
    Err.Clear
    sColl = objADObject.GetEx(strProperty)
    If (Err.Number = 0) Then
    For Each strItem In sColl
    objFile.Write("," & strProperty & "|||" & CStr(strItem))
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Next
    On Error GoTo 0
    Else
    Err.Clear
    Set objDate = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    lngHigh = objDate.HighPart
    If (Err.Number = 0) Then
    lngLow = objDate.LowPart
    If (lngLow < 0) Then
    lngHigh = lngHigh + 1
    End If
    lngValue = (lngHigh * (2 ^ 32)) + lngLow
    If (lngValue > 120000000000000000) Then
    dtmValue = #1/1/1601# + (lngValue / 600000000 - lngBias) / 1440
    On Error Resume Next
    dtmDate = CDate(dtmValue)
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||<Never>")
    Else
    objFile.Write("," & strProperty & "|||" & CStr(dtmDate))
    End If
    Else
    objFile.Write("," & strProperty & "|||" & FormatNumber(lngValue, 0))
    End If
    Else
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Else
    On Error GoTo 0
    objFile.Write("," & strProperty)
    End If
    On Error GoTo 0
    End If
    End If
    Next
    ' Enumerate optional object properties.
    For Each strProperty In objClass.OptionalProperties
    On Error Resume Next
    strValue = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    On Error GoTo 0
    If (TypeName(strValue) = "String") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Long") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Date") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Byte()") Then
    strHex = OctetToHexStr(strValue)
    objFile.Write("," & strProperty & "|||" & CStr(strHex))
    ElseIf (TypeName(strValue) = "Variant()") Then
    For Each strItem In strValue
    On Error Resume Next
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strItem), ",", ";;;"))
    If (Err.Number <> 0) Then
    On Error GoTo 0
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    On Error GoTo 0
    Next
    ElseIf (TypeName(strValue) = "Boolean") Then
    objFile.Write("," & strProperty & "|||" & CBool(strValue))
    Else
    objFile.Write("," & strProperty & "|||Type:" & TypeName(strValue))
    End If
    Else
    Err.Clear
    sColl = objADObject.GetEx(strProperty)
    If (Err.Number = 0) Then
    For Each strItem In sColl
    objFile.Write("," & strProperty & "|||" & CStr(strItem))
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Next
    On Error GoTo 0
    Else
    Err.Clear
    Set objDate = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    lngHigh = objDate.HighPart
    If (Err.Number = 0) Then
    lngLow = objDate.LowPart
    If (lngLow < 0) Then
    lngHigh = lngHigh + 1
    End If
    lngValue = (lngHigh * (2 ^ 32)) + lngLow
    If (lngValue > 120000000000000000) Then
    dtmValue = #1/1/1601# + (lngValue / 600000000 - lngBias) / 1440
    On Error Resume Next
    dtmDate = CDate(dtmValue)
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||<Never>")
    Else
    objFile.Write("," & strProperty & "|||" & CStr(dtmDate))
    End If
    Else
    objFile.Write("," & strProperty & "|||" & lngValue)
    End If
    Else
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Else
    On Error GoTo 0
    objFile.Write("," & strProperty & "||| ")
    End If
    On Error GoTo 0
    End If
    End If
    Next
    objFile.WriteLine("")
    adoRecordSet.MoveNext
    Loop
    objFile.Close
    ' Function to convert OctetString (Byte Array) to a hex string.
    Function OctetToHexStr(arrbytOctet)
    Dim k
    OctetToHexStr = ""
    For k = 1 To Lenb(arrbytOctet)
    OctetToHexStr = OctetToHexStr _
    & Right("0" & Hex(Ascb(Midb(arrbytOctet, k, 1))), 2)
    Next
    End Function
    I have been able to obtain all the Computer, Contact, Group and OU objects without issue with this code...

  • List all form fields with JS?

    I imagine this is a pretty easy one, but does anyone know what the script would be to list all form fields in the console?  Specifically, at the moment, I only need it for buttons, but I imagine it would be useful for any fields as well.

    Take a look at the "Required Fields" tool at this site:
    http://www.pdfscripting.com/public/65.cfm
    Its a toolbar button that lists all fields that are required. It could easily be changed to filter for any field parameter, or none.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    http://www.adobe.com/devnet/acrobat/javascript.html
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)

  • Transaction Code to list all standard function modules available in SAP

    Is there any transaction code to list all standard function modules with their
    grouping.......like in transaction BAPI all bapis are listed w.r.t. their
    functionalities....

    Then Try SE84 -> Program Library -> Function modules. Execute to list all FMs.
    By the way may we ask the purpose for it, as my ECC 6.0 system has exactly 3,78,979 FM's.
    Otherwise if this is an interview question, press the abuse button ( a small yellow traingle at the right of your message subject line ), and in the coming page enter "Interview question" and press Report Abuse.
    Hope i have cleared your query.
    Regards
    Karthik D

  • How to left align the signature field of dynamic pdf

    Hi,
    I am working on dynamic (interactive) pdf and using Adobe LiveCycle Designer (Adobe Acrobat 9 Pro). My problem is that I cannot align left the signature field of my pdf. I can align left, right and center for textboxs and cannot just do that for signature field. When I couldn't do that from GUI I went to XML code for signature and tried this:
                       <para hAlign="left"/>  but it still didn't work. Ideally it should have worked.
    I would really appreciate if you could help me.
    Regards,
    Kiran

    Use skinning. Use the following skin selector:
    af|panelFormLayout::label-cell {text-align: left; }If you want to apply it only on particular panelFormLayout, then set a custom styleClass on the given <af:panelFormLayout> tag (for example, <af:panelFormLayout styleClass="MyStyleClass" ... >) and use a styleClass-dependent skin selector:
    af|panelFormLayout.MyStyleClass::label-cell {text-align: left; }Adding a custom skin is easy. If you do not know how, see this topic in the documentation: 20.2 Applying Custom Skins to Applications
    Dimitar

  • Placing a signature field in a PDF in Acrobat X

    In Acrobat 9 I could place a signature field into a pdf without converting the PDF into a form.  The procedure began with clicking on the Forms tab.  I could drag the signature field to a location and a user could click on the signature field and digitally sign the doc.  How is this done in Acrobat X?  Please let me know if you need any more details.

    A signature field is a type of form field. If you want to set up the document so that a Reader user can add a digital signature, you should first add a signature field to the document and then Reader-enabled it by selecting: File > Save As > Reader Extended PDF > Enable additional features
    To add form fields, select: Tools > Forms > Edit

  • How to add digital Signature Field in cfdocument pdf files?

    Hi,
    We are generating pdf files using cfdocument to populate values and wondering how we can add digital signature field in those pdf files. Any help or comments would be deeply appreciated.
    Thanks,
    hismail786

    Hi,
    Yes, we have options to add digital signature to the pdf. We have one attribute called "Permissions" in "cfpdf" tag. If we provide permissions = 'AllowSecure', then system would allow digital signature for that pdf.
    Please go though the docs for details info. I will post in details next.
    Thanks
    Chandrakant

  • Duplicating form fields from one PDF document to another

    Hi,
    Does anyone know of a way to select and duplicate all acrobat form fields from one PDF document into a new PDF document. I know I can do so one field at a time but would like to know if there is a way to do so in a wholesale fashion.
    Our PDF documents are created in-house each year and are nearly the same as the previous year's document containing 99% of the same form fields in the same locations. These forms contain a lot of form fields, anywhere from 50 to 100 fields.
    Rather than start from scratch each year defining the same fields that were present in the previous year's document, I am looking for a way to copy the form fields from an existing PDF document (last year's PDF in our case) and copy the form fields into a new PDF document (that does not yet have any form fields defined) and hopefully maintain all the field attributes and positions from the previous years document.
    Thanks for any suggestions,
    Steve

    The PDF template we need to copy the form fields "to" doesn't start out having any form fields. It is the fields that we need copied from a previous year's PDF template.
    Here's an except from my original post: "I am looking for a way to copy the form fields from an existing PDF document (last year's PDF in our case) and copy the form fields into a new PDF document (that does not yet have any form fields defined)"
    The "new" PDF template is a complete "paper" form with updated legal text and calendar year referrences but NO form fields. In our IS group, we then take these forms, add form fields to them and are then able to populate them with database-resident user data. We serve them up to the user in their browser pre-populated with their application data.
    So again, our need is to find a way to copy form fields from "last year's" PDF template and copy just the form fields to an fresh "new year's" PDF template that contains no form fields to begin with. What we begin with is just a PDF representation of a paper student loan application.
    Thanks for the suggestion!

  • How do I activate the "Signature" options of a PDF document created 11/8/13

    How do I activate the "Signature" options on a PDF document?

    Hi Spud640,
    Click the Sign button on the toolbar to open the Sign panel
    The panel is divided into three sections, expand the I Need to Sign section
    Click the Place Signature button under Fill & Sign
    Select the Draw my signature radio button
    Use your mouse to create a signature in the large edit field
    Click the Accept button
    At this point the cursor is the signature, where ever you click in the file will place this image,
    Unless you clear the signature, the next time you select the Place Signature button you won't see the dialog above, it will just go right to turning the cursor into your signature.
    Steve

  • I can't affix my valid digital signature to adobe reader pdf document?

    I can't affix my valid digital signature to adobe reader pdf document. When the signature field is clicked, it is not showing my digital ID so that I can sign with it. Why it is not displaying my valid digital ID?

    What is your operating system?  What is your Reader version?  What means "can not"?
    Can you post a screenshot of such a message "to buy Adobe XI"?

  • I did download the new version of adobe but a massage showed all the time (Before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement, then Quit and relaunch the browser)

    i did download the new version of adobe but a massage showed all the time (Before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement, then Quit and relaunch the browser)

    You downloaded Adobe... what? Adobe has tons of applications.
    Which Adobe product did you download?
    Clinton

  • Does anyone know how I can create a text field in a pdf document that will multiply a total in another box?

    does anyone know how I can create a text field in a pdf document that will multiply a total in another box? I’m making an interactive pdf for an order form (attached), and I need to find a way for the “total quantity” number to multiply by 9 and total in the “Amount Due” box.

    Hey Gary,
    Have a look at this post: Re: horizontal scrolling similar to excel
    Andy's reply will show you how to make a table scroll horizontally, but it will be tough to accomplish it in some sort of easily replicable way. I am working on a JQuery extension that will help accomplish this, but I have had my time invested in another project at the moment.
    Good Luck,
    Tyson

  • How to list all the fields under an Infotype!

    Hi
    I need a list of fields under an Infotype, used the following link to list them but unsuccesful, is there any other way I can list the infotype feilds.
    Re: Infotype 0002 all fields
    Thanks

    Hi Tara,
    The FM 'DDIF_FIELDINFO_GET' gives you all the fields of the table in the Exporting IT 'DFIES_TAB' that you mention under the parameter 'TABNAME'. I am not sure why it doesnt work for you. Alternatively you can also try this FM 'DDIF_NAMETAB_GET' (This FM is actually used in the FM 'DDIF_FIELDINFO_GET' ) .
    If you are still unsuccesful in meeting your requirement then please paste your piece of code.
    Regards
    Nanda

Maybe you are looking for

  • What if my Apple ID is the same as my AOL email address?

    If my Apple ID is the same as my AOL email address but the passwords are different, do I still need to change it? I logged out of iTunes and back in as instructed but no prompt to change my Apple ID.

  • In random mode some songs stop playing before being finished

    in random mode some songs stop playing before being finished

  • Transfer G4 Address Book to new Imac

    Hi! Please tell me where my address book is located on my G4. I will transfer it using firewire to my Imac but not sure where it is. Once found do I just copy it to the new Imac location? Thanks, Mike

  • Setting of attachment directory for axis

    Hi, I'm working on web services using axis 1.2.1. In the application that we are developing we are sending attachments. Axis has got a parameter in server-config.wsdd for setting the attachment directory. But the problem is it is only taking the abso

  • Pages out taking all available GB

    I start with 57 available GB when I start up.  They steadily decline until the computer freezes in about 1-2 hours, without opening apps. Activity monitor shows pages out increasing by GB, it is about 10 X the pages in. The only program using signifi