PDF Viewer handWrittenSignatureSettings not working

HI,

PDF Viewer handWrittenSignatureSettings not working

https://stackblitz.com/edit/angular-7bqjms?file=app.component.html





6 Replies 1 reply marked as answer

SK Shamini Kiruba Sobers Syncfusion Team March 4, 2022 11:26 AM UTC

Hi, 

Kindly try the modified sample below and let us know if it helps. 


Code snippet: 

var pdfviewer = (<any>document.getElementById('pdfViewer')) 
  .ej2_instances[0]; 
pdfviewer.annotationModule.setAnnotationMode('HandWrittenSignature'); 
pdfviewer.handWrittenSignatureSettings.signatureItem = ['Signature']; 

If you are still facing any issues, please revert to us. 

Regards, 
Shamini 



TE techlandandyzhang March 7, 2022 02:06 PM UTC

By the measure you offered, no crash encountered.

However, I only need the one “ADD SIGNATURE” showing on the screen, for the other one “ADD INITIAL”, it should be hidden.


So, how to realize the effect?





SK Shamini Kiruba Sobers Syncfusion Team March 8, 2022 09:35 AM UTC

Hi, 

Thanks for the update. Since the documentLoad event gets triggered only after the completion of the toolbar initialization with the initial settings, you are not realizing the effect. It works only when the document starts loading before the handwritten signature settings are applied. 

Hence, we are proceeding to validate the initially reported issue “Script error is thrown when setAnnotationMode is called to select HandWrittenSignature after customizing the signatureItem options”. We will validate the issue and update further details on March 10, 2022

Regards, 
Shamini 



SK Shamini Kiruba Sobers Syncfusion Team March 11, 2022 03:39 PM UTC

Hi, 

We have validated the issue “A script error occurs after customizing the handwritten signature settings and clicking AddSignature” and logged it as a defect. The fix for the issue will be available in our upcoming weekly NuGet release on March 30, 2022. You can track the status of the issue through the following link. 


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.” 

Regards, 
Shamini


SK Shamini Kiruba Sobers Syncfusion Team March 31, 2022 04:38 AM UTC

Hi,


Sorry for the inconvenience. Due to the Volume 1 release, there is no weekly release for this week. So we will include the fix in our upcoming weekly NuGet release on April 6, 2022. We will let you know once the package is available for download.


Regards,

Shamini



SK Shamini Kiruba Sobers Syncfusion Team April 7, 2022 04:00 AM UTC

Hi,


We have fixed the issue at the sample level. Kindly find the modified sample below to customize the handwritten signature without script error.


Sample: https://stackblitz.com/edit/angular-7bqjms-atqyh6?file=app.component.ts


Code snippet:


In app.component.html file :
<div class="control-section">

  <div class="content-wrapper">

    <ejs-pdfviewer

      #pdfviewer

      id="pdfViewer"

      [serviceUrl]="service"

      [documentPath]="document"

      style="height:640px;display:block"

      (documentLoad)="documentLoad($event)"

      [handWrittenSignatureSettings]="handWrittenSignatureSettings"

    >

    </ejs-pdfviewer>

  </div>

</div>

 

In app.component.ts file : 

import { DisplayMode } from '@syncfusion/ej2-pdfviewer'; 

export class AppComponent {

  @ViewChild('pdfviewer')

  public pdfviewerControl: PdfViewerComponent;

  public service: string =

    'https://ej2services.syncfusion.com/production/web-services/api/pdfviewer';

  public document: string = 'PDF_Succinctly.pdf';

public handWrittenSignatureSettings = {

    signatureItem: ['Signature'],

    signatureDialogSettings: {

      displayMode: DisplayMode.Draw | DisplayMode.Text | DisplayMode.Upload,

      hideSaveSignature: false,

    },

    initialDialogSettings: {

      displayMode: DisplayMode.Draw | DisplayMode.Text | DisplayMode.Upload,

      hideSaveSignature: false,

    },

  };

  ngOnInit(): void {

    // ngOnInit function

  }

public documentLoad(e: LoadEventArgs): void {

    this.pdfviewerControl.annotationModule.setAnnotationMode(

      'HandWrittenSignature'

    );

  }

  }


Regards,

Shamini


Marked as answer
Loader.
Up arrow icon