syncfusion / ej2-javascript-ui-controls

Syncfusion JavaScript UI controls library offer more than 50+ cross-browser, responsive, and lightweight HTML5 UI controls for building modern web applications.
https://www.syncfusion.com/javascript-ui-controls
Other
401 stars 160 forks source link

PdfViewer: When creating a signature field the background color is ignored. #147

Closed SergenN closed 2 years ago

SergenN commented 2 years ago

When creating a signature field by creating a custom drawing object the backgroundColor field is ignored while the settings in signatureIndicatorSettings work fine. It would be great for aesthetic purposes that the background color field is not ignored for signature fields.

https://stackblitz.com/edit/angular-wf5rwu-gt6gvb?file=app.component.ts

I'm setting the drawtool like this:

addSignatureField(isInitial = false) {
    (this.pdfviewerControl.drawingObject as any) = {
      formFieldAnnotationType: 'SignatureField',
      name: 'Signature',
      color: '#bd0e0e',
      backgroundColor: 'rgba(000,000,000, .3)',
      isRequired: false,
      isPrint: true,
      tooltip: 'Test tooltip',
      font: {
        isItalic: false,
        isBold: false,
        isStrikeout: false,
        isUnderline: false,
      },
      isInitialField: isInitial,
      signatureIndicatorSettings: {
        text: 'Test indicator text',
        backgroundColor: 'rgba(000,000,000, .3)',
        color: '#bd0e0e',
      },
    };
    this.pdfviewerControl.tool = 'DrawTool';
  }
DhivyaBharathi1307 commented 2 years ago

Hi Team,

On further analysis, we suspect that you have tried to add the signature field using the DrawingObject with the PDF Viewer instances. But Syncfusion PDF Viewer has used this property as private. So, we cannot access this property. We suggest you use the addFormField method as in the below Online demo to add the form fields.

However, currently, Syncfusion PDF Viewer does not have support to change the background color of the signature field. We have logged this as a feature and the feature implementation will be included in any of our upcoming releases. We do not have any immediate plans to implement this feature. We will let you know once the feature is implemented in our PDF Viewer. You can track the status using the below feedback link,

Feedback: https://www.syncfusion.com/feedback/33319/need-to-provide-support-to-change-background-color-for-signature-field

Online demo for adding the form fields: https://ej2.syncfusion.com/angular/demos/#/bootstrap5/pdfviewer/form-designer

UG documentation for adding the form fields: https://ej2.syncfusion.com/angular/documentation/pdfviewer/form-designer/create-fillable-PDF-forms/create-programmatically/

https://ej2.syncfusion.com/angular/documentation/pdfviewer/form-designer/create-fillable-PDF-forms/create-with-user-interface-interaction/

Regards, Dhivya.

syncsiva commented 2 years ago

This issue has not had any activity for a week. Closing for housekeeping purposes. Please feel free to reopen it if you have more information that can help us investigate the issue further.