I'm importing data to PDF Viewer. In this case backbroudColor property is working but tooltip never change.
Hi Manuel,
We were able to
change the tooltip values, and we have provided the code snippet and sample
below for your reference.
Code snippet:
|
const updateBackgrounAndTooltip = () => { if (pdfViewerRef) { try { const formFields = pdfViewerRef.retrieveFormFields(); formFields.forEach((field) => { const updateObj = { tooltip: field.name, backgroundColor: '#dde4ff' }; pdfViewerRef.formDesignerModule.updateFormField(field, updateObj); }); } catch (error) { console.error('Error importing form fields', error); } } }; |
Sample: TooltipSample
Run the sample. Hover over the form fields; the tooltip is initially not available. Click the `UpdateBackgroundAndTooltip` button to update the background and tooltip values, and then hover over the form fields again to see the tooltip.
Note: We were unable to remove the form field tooltip programmatically. We will validate this and provide further details within two business days, by September 20, 2024.
Hi Manuel,
We have logged this
as a defect as "Programmatically removing
form field tooltip is not working" and will include the fix in our
weekly NuGet release, which is estimated to be available on October 15, 2024. You can track the status of
the issue through the following link.
Feedback link: Programmatically removing form field tooltip is not working | Issue Feedback
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."
Hi Manuel,
We have fixed the reported issue "Programmatically removing form field tooltip is not working" and the fix for the reported issue was included in our latest weekly release v27.1.53. Kindly upgrade to that version to get the issue resolved.
Root cause:
Since the tooltip is empty when updating in the formfieldpropertychange method the condition gets skipped for the tooltip.
Solution:
To fix this
issue should check the nullorundefined condition for the tooltip. Then the
tooltip gets updated properly.
Packages:
|
Service side package |
ASP.NET Core : https://www.nuget.org/packages/Syncfusion.EJ2.PdfViewer.AspNet.Core ASP.NET MVC: https://www.nuget.org/packages/Syncfusion.EJ2.PdfViewer.AspNet.Mvc5/ https://www.nuget.org/packages/Syncfusion.EJ2.PdfViewer.AspNet.Mvc4/ |
CDN Links:
https://cdn.syncfusion.com/ej2/27.1.53/dist/ej2.min.js
https://cdn.syncfusion.com/ej2/27.1.53/material.css
https://cdn.syncfusion.com/ej2/27.1.53/dist/ej2-pdfviewer-lib/pdfium.js
https://cdn.syncfusion.com/ej2/27.1.53/dist/ej2-pdfviewer-lib/pdfium.wasm