Forum rules DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
The solution was that you guys created a new PXCVA_EventType named "Notifications.NewAnnotAdded" which also made it possible to read the property "Notifications.NewAnnotAdded.Source":
If (e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnNamedNotify) And (e.name = "Notifications.NewAnnotAdded") Then
' get window id
AxCoPDFXCview1.GetActiveDocument(nDocID)
' get source of new annot
AxCoPDFXCview1.GetProperty("Notifications.NewAnnotAdded.Source", vDataOut)
' new annot created
If (vDataOut = 0) Then ...
' pasted annot by user
If (vDataOut = 1) Then ...
Is there already a similar property/way in the Editor SDK? If not, is there a chance that you create a source property for the IPXC_Annotation Interface (https://sdkhelp.pdf-xchange.com/vi ... Properties)?
I registered my application to the "e.annots.inserted" event and I'm also able to iterate the annotation list. But I can't find a property of the annotation which tells me if it was pasted by the user or created as a new annotation.
For me it is essential to know if the user pasted a already existing annotation of if the user created a new one.
in our application and implemantation of the PDF Editor I do load pdf documents with annotions which different users created at different/earlier times. The current user of the pdf document can see all these annotations on the pdf document and he has the possibility to copy and paste these annotations. This is where I need to know if the new annot was created from scratch or was an existing annot.
For the Viewer SDK you guys implemented the notify event and property which I mentioned and refered in my initial post. Now, that I'm working on the implementation of the Tracker Editor in our application I do need the same functionallity.
Well, you can always catch the https://sdkhelp.pdf-xchange.com/vi ... oreExecute event and see whether it's an insert annotation operation. If so, mark this with some class-level boolean value and look for it in the event I mentioned before. This should work.
And the "e.annots.instered" event is the only one which makes sense (like you suggested earlier). But my problem is that I'm not able to differ from an annot which is a new one and an annot which has been pasted. On both options the e.annots.inserted event is triggered which does not give me any further information about the annot except of IPXC_Annotation properties.
Well, you can always catch the https://sdkhelp.pdf-xchange.com/vi ... oreExecute event and see whether it's an insert annotation operation. If so, mark this with some class-level boolean value and look for it in the event I mentioned before (e.annots.inserted). This should work.
I'm sorry, but I still don't see a chance to differ if an annot was created or inserted (using copy and paste). The registered event for "e.annots.inserted" is fired every time and the eventId is always the same (value: 2478). I don't have a source property inside of the IPXC_Annotation object or the event object. This makes it impossible to check if the annot was copied or created.
Is there another option to get the source of the inserted annot (like it was in the PDF-XChange Viewer)?
your suggestion doesn't work because I found another issue when copying an existing annotation. The creation date of the copy is not updated to the current date as you can see here:
The date itself is being copied along with the annotation - that can give you a hint that it's a copied annotation, not a newly inserted one. The one thing that differs in the copied annotations is the Name of the annotation.