HI,
PDF Viewer handWrittenSignatureSettings not working
https://stackblitz.com/edit/angular-7bqjms?file=app.component.html
|
var pdfviewer = (<any>document.getElementById('pdfViewer'))
.ej2_instances[0];
pdfviewer.annotationModule.setAnnotationMode('HandWrittenSignature');
pdfviewer.handWrittenSignatureSettings.signatureItem = ['Signature']; |
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?
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
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="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