Community articleUFLDeleteSignature function
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.


This function deletes the specified digital signature in the form. For security reasons, the form must meet certain criteria before this is allowed. None of the following should be locked by another signature: the signature, its descendants, the associated signature button, and its signer option. If these criteria are met, then the signature's locks are removed, the signature item is deleted, and the signer of the associated signature button is set to empty ("").


   r_short UFLDeleteSignature(
      formNodeP theForm,
      formNodeP signatureItem


Table 1. Function parameters
theForm formNodePThe root node of the form containing the signature to delete.
signatureItemformNodePThe signature node to delete. You can retrieve this node by calling UFLDereferenceEx


OK on success or an error code on failure.

Usage details

If the signatureItem item contains a layoutinfo option, UFLDeleteSignature will not remove the entire signature from the form. Instead, the signature item and the layoutinfo option will remain. To completely delete the signature item, you must delete the remaining nodes manually by using UFLDestroy to delete the signature item.


In the following example, UFLDereferenceEx is used to locate the node of a signature button. UFLDeleteSignature is then used to delete the signature from the form.
   r_error deleteSignature(formNodeP form)
   formNodeP tempNode;
   r_boolean layoutinfo;
      /* Locate the signature node. */
      if ((tempNode = UFLDereferenceEx(form, NULL, "PAGE1.SIGNATURE", 0, 
         fprintf(stderr, "Could not locate SIGNATURE node.\n");
      /* Check to see if the signature contains a layoutinfo option. Set 
         layoutinfo to OK if it does or NOTOK if it doesn't. */
      layoutinfo = OK;
      if(UFLDereferenceEx(tempNode, NULL, "layoutinfo", 0,
         layoutinfo = NOTOK;
      /* Delete the signature. */
      if(UFLDeleteSignature(form, tempNode) != OK)
         fprintf(stderr, "Could not delete signature.");
      /* If there was a layoutinfo option, destroy the remaining signature 
         item. */
      if (layoutinfo == OK)
         if(UFLDestroy(tempNode) != OK)
            fprintf(stderr, "Could not destroy signature node.");

Parent topic:
FormNodeP functions