Click on PdfAnnotation in PdfViewer?
A trick we do in the Adobe API is to set Text Annotations to identify events in the PDF with the annotation's author, time, and subject set to the information specified in the text. Is there someway to hook the event in PdfViewer when the user clicks on the annotation and bring up our custom editor control to set the attributes in a way that matches to our data model? (Best if in VB to avoid the frequent C-pound crashes please.)
Hi Henry,
As per your requirement, we can change the author and subject when selecting the text annotation using the FreeTextAnnotationChanged event in PdfViewer. But the user was not allow to change the modified time of the annotation. We have created simple sample to demonstrate how to change the author and subject of annotation while selecting.
Please find the code snippet below and we have attached sample for your reference.
|
Private Sub pdfViewer_FreeTextAnnotationChanged(sender As Object, e As FreeTextAnnotationChangedEventArgs) If e.Action = AnnotationChangedAction.[Select] Then e.Settings.Author = "User" e.Settings.Subject = "Free Text Annotation" End If End Sub |
Regards,
Manigandan
Attachment: HostedSample_889a5399.zip
How do I capture the event of clicking on an annotation?
Also the Adobe JS call addAnnot lets me set modDate to whatever I need.
Henry, we have an annotation changed event for all supported annotation in PdfViewer. Through these we can get and set information of the annotation while add, delete, move, resize, select or deselect.
Please find the code snippet below for how to set information for free text annotation using FreeTextAnnotationChanged .
|
PdfViewer.xaml If e.Action = AnnotationChangedAction.[Select] Then e.Settings.Author = "User" e.Settings.Subject = "Free Text Annotation" End If End Sub |
For changing the modified date and time of an annotation, we will analyze and update the further details on May 24, 2023.
Looking forward to your mod date changes so that I can ditch a requirement to run full Adobe Acrobat in order to set this via Javascript.
The event I'd rather hook is user clicks on annotation so I can check to see if I need to open my specialized editor rather than the generic view at that point.
Henry, We have logged a feature request for the “Need to change the modified date and time of annotation” stamps support. We do not have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest.
Based on our present commitments and the above parameters, this feature is expected to be implemented in our 2023 Volume 2 SP1 release. We will let you know when this feature is implemented.
Disclaimer: The date for the feature implementation is tentative and not a commitment on our parts.
You can now track the status of this feature request here,
https://www.syncfusion.com/feedback/43982/need-to-change-the-modified-date-and-time-of-annotation
Hi Henry,
We are glad to
announce that our Essential Studio 2023 Volume 2 Service Pack release, v22.2.5,
has been rolled out. We have included the feature "Need to change the modified date and time of annotation,"
and it is available for download under the following link:
In our WPF PdfViewer allows users to easily change the date and time for all annotations. We can achieve this through an annotation change event by following actions like add, select, move, etc. Please find below the code snippet and attached sample for your reference.
|
pdfViewer.FreeTextAnnotationChanged += PdfViewer_FreeTextAnnotationChanged;
private void PdfViewer_FreeTextAnnotationChanged(object sender, FreeTextAnnotationChangedEventArgs e) { if (e.Action == AnnotationChangedAction.Select) { e.Settings.ModifiedDate = new DateTime(2020,12,29,09,30,15); } } |
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Please find the feedback link below,
https://www.syncfusion.com/feedback/43982/need-to-change-the-modified-date-and-time-of-annotation
Attachment: sample_40dea5e5.zip
- 7 Replies
- 3 Participants
-
HE Henry
- May 17, 2023 10:22 PM UTC
- Jul 31, 2023 11:46 AM UTC