I have the following events in my PdfViewerServer:
<PdfViewerEvents AnnotationAdded="@AnnotationAdded" DocumentLoaded="@DocumentLoaded" AnnotationRemoved="@AnnotationRemovedv2" AnnotationSelected="@AnnotationSelected" />
When an annotation is copied then pasted, it does not appear to add it correctly to the annotation listing nor does the AnnotationAdded event get triggered.
Is there a way to prevent copy/paste or is there a workaround that I haven't found to address this issue?
|
Query |
Response | |
|
When an annotation is copied then pasted, it does not appear to add it correctly to the annotation listing nor does the AnnotationAdded event get triggered. |
We have supported to trigger the AnnotationAdded event only when the annotations are added from the annotations toolbar and not on copying and pasting an annotation. This is the current behavior in PDF Viewer.
However, we will validate the feasibility to trigger AnnotationAdded event for the copied and pasted annotations too. We will share the validation details in two business days on October 18th, 2021.
| |
|
Is there a way to prevent copy/paste or is there a workaround that I haven't found to address this issue? |
You can lock the annotation to prevent editing it by setting the IsLock property to true as below.
Code snippet:
But locking the annotations prevents all the other interactions like Delete, Move, Resize, and Select too.
|
Thank you for your reply. Locking the annotation is not an option so hopefully your validation will provide a better option.
|
Query |
Details | |
|
When an annotation is copied then pasted, it does not appear to add it correctly to the annotation listing nor does the AnnotationAdded event get triggered
|
We have confirmed that the reported issue “annotationAdd event is not triggered properly” is a defect and logged the defect report for the same. The fix for this issue will be included in our upcoming weekly NuGet release on November 10, 2021.
You can track the status using the below feedback link.
| |
|
Is there a way to prevent copy/paste or is there a workaround that I haven't found to address this issue? |
We can prevent the copy and Paste context items using the contextMenuSettings property. Please find the code snippet and sample link below.
Code snippet:
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorSample-1632828803.
However, we can be able to copy and paste the annotation using keyboard shortcut keys. So, we have logged “Restrict keyboard shortcuts in PDF viewer” as a feature request. But we don’t have any immediate plans to implement this feature. We will include the feature in any of our upcoming releases. You can track the status using the below feedback link,
|