File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed 
How to/Form Designer Signature in Default Toolbar/WebApplication5/WebApplication5/Pages Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3434} 
3535<br >
3636<br >
37+ <!--  PDF Viewer component with toolbar settings and document path --> 
3738<ejs-pdfviewer  id =" pdfviewer" style =" height 600px  " toolbarSettings =" toolbarSettings" documentPath =" https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" documentLoad =" documentLoad" 
3839</ejs-pdfviewer >
3940<script >
40-     var  isSignatureAdded =  false ; 
41+     var  isSignatureAdded =  false ; //  Flag to ensure menu is added only once 
42+ //  Event triggered when the document is loaded
4143    function  documentLoad (args ) { 
4244        if  (! isSignatureAdded) { 
4345            var  signatureMenuItems =  [ 
4648                    items:  [{ text:  ' Add Signature' :  ' Add Initial'  
4749                }, 
4850            ]; 
51+   //  Initialize Syncfusion Menu component for signature options 
4952            new  ej.navigations.Menu ( 
5053                { 
5154                    items:  signatureMenuItems, 
5760            isSignatureAdded =  true ; 
5861        } 
5962    }; 
63+ //  Handles click events on signature menu items
6064    function  onSignatureClick (event ) { 
6165        var  viewer =  document .getElementById (' pdfviewer' ej2_instances [0 ]; 
6266        if  (event .element .innerText  ===  ' Add Signature'  
6771            viewer .formDesignerModule .setFormFieldMode (" InitialField"  
6872        } 
6973    } 
70- script >
74+ script >
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments