"SfPdfViewer annotationSelected" event send only the first charactere with args.AnnotationProperties.TextMarkupContent
Hello,
I'm still reviewing your product, I'm facing to a problem when I apply an annotation on a pdf text, I want to get the content of the annotation text with this event : annotationSelected => fully code :
<SfPdfViewer @ref=Viewer DocumentPath="@DocumentPath" ServiceUrl="/pdfviewer" Height="800px" Width="100%">
<PdfViewerEvents OnTextSelectionStart="selectionStart" AnnotationSelected="annotationSelected" AnnotationAdded="annotationAdd" OnTextSelectionEnd="selectionEnd"></PdfViewerEvents>
</SfPdfViewer>
public void annotationSelected(AnnotationSelectEventArgs args)
{
selectedProp.Values = new List<Value>() { new Value() { Data = args?.AnnotationProperties?.TextMarkupContent, Height = 100, Page = 2, Width = 120, X = 12, Y = 78 } };
}
For the first time it's work but after the second, the TextMarkupContent send only the first charactere
I send you a sample to reproduce the problem, I have a new Tab named "PDF Viewer final 3" inside I have the pdfviewer component and an other panel with one field.
When I click on one field I apply annotation on the pdfviewer, you must see 3 annotations in yellow color. After I click on one annotation and I want to get the content of the annotation text, it's work for the first annotation but not for the other I have only the first charactere not the full block...?
Thanks for your help
Nicolas
Attachment: BlazorAppPOC__HL__2_df3ba280.zip
SIGN IN To post a reply.
7 Replies
1 reply marked as answer
DM
Dhivyabharathi Mohan
Syncfusion Team
February 24, 2021 08:54 AM UTC
Hi Nicolas,
Thank you for contacting Syncfusion support.
We were able to reproduce the reported issue. We will analyze further and provide details on 26 February 2021.
Regards
Dhivya.
DM
Dhivyabharathi Mohan
Syncfusion Team
February 26, 2021 12:28 PM UTC
Hi Nicolas,
We confirmed that the reported issue is a defect and the fix will be included in April 1st weekly NuGet release
Regards,
Dhivya.
DM
Dhivyabharathi Mohan
Syncfusion Team
April 1, 2021 01:15 PM UTC
Hi Nicolas,
As we mentioned earlier, we will include this fix in our upcoming weekly NuGet release on April 6th, 2021.
Regards,
Dhivya.
SM
Selvakumar Murugan
Syncfusion Team
April 7, 2021 01:20 PM UTC
Hi Nicolas,
Sorry for the inconvenience.
The fix for the reported issue was not included in the latest weekly release. The fix will be included in our upcoming weekly nuget release on 14th April 2021.
Regards,
Selvakumar
Selvakumar
DM
Dhivyabharathi Mohan
Syncfusion Team
April 14, 2021 12:13 PM UTC
Hi Nicolas,
We have fixed the reported “The text content is not exported properly for the text markup annotation” issue and the fix was included in our latest NuGet weekly release v19.1.0.56. Kindly upgrade to that version to get the issue resolved.
Packages link:
|
Blazor Client |
|
|
Blazor Sever |
|
|
Service side package |
ASP.NET Core :
https://www.nuget.org/packages/Syncfusion.EJ2.PdfViewer.AspNet.Core.Windows/ https://www.nuget.org/packages/Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux/
ASP.NET MVC:
|
CDN links:
Regards,
Dhivya.
NN
Nicolas NOEL
April 15, 2021 09:04 AM UTC
Hi Dhivya,
Sorry it does not work, a this time this function annotationSelected => TextMarkupContent return nothing
public void annotationSelected(AnnotationSelectEventArgs args)
{
//selectedProp.Values = new List() { new Value() { Data = args?.AnnotationProperties?.TextMarkupContent, Height = 100, Page = 2, Width = 120, X = 12, Y = 78 } };
Console.WriteLine("==== annotationSelected =====");
Console.WriteLine("TextMarkupContent " + args?.AnnotationProperties?.TextMarkupContent);
}
You can check with the sample I send you before. Remove this line => "/selectedProp.Values = new List() { new Value() { Data = args?.AnnotationProperties?.TextMarkupContent, Height = 100, Page = 2, Width = 120, X = 12, Y = 78 } };"
because now it's crash...
Update to the last version of Syncfusion.Blazor.PdfViewer
And you see the function return nothing.
Thanks,
Nicolas
DM
Dhivyabharathi Mohan
Syncfusion Team
April 16, 2021 12:05 PM UTC
Hi Nicolas,
In our previous implementation, the text content is not preserved in the exported JSON file. We have fixed the issue for preserving the text contents in exported file. We suspect that you are trying to import the older JOSN file and so, the issue might occur.
We suggest you to export a new JSON file and then import the exported file. We have modified the sample for your reference.
Sample:
Kindly try this and revert us, if you have any concerns.
Regards,
Dhivya.
Marked as answer
SIGN IN To post a reply.
- 7 Replies
- 3 Participants
- Marked answer
-
NN Nicolas NOEL
- Feb 23, 2021 04:33 PM UTC
- Apr 16, 2021 12:05 PM UTC