I'm setting 'Notifications.NewAnnotAdded.Enabled' when I first open a document. With each annotation added to the doc the event is executed correctly. I then close all the documents and open another document in the same viewer instance. The NewAnnotAdded property is still set to 1 but the event 'Notifications.NewAnnotAdded' isn't fired. The non-fired event continues to occur with each doc loaded in the same viewer instance. If I close the viewer down and load a doc, the events are fired once again until I close all documents and load another document.
Is there another property that needs to be set in order for this to work correctly? Does another property need to be set before or after the 'Notifications.NewAnnotAdded.Enabled'? Am I doing something incorrect in the code below? Is there a bug in the product?
Here's an example of code I'm basically implementing. The GetProperty calls are only there to validate that NewAnnotAdded is actually set to 1.
Code: Select all
pdfview.GetProperty( 'Notifications.NewAnnotAdded.Enabled', vDataOut, 0); //vDataOut = 0
pdfview.SetProperty( 'Notifications.Selection.Filter', 'Annotations', 0 );
pdfview.SetProperty( 'Notifications.NewAnnotAdded.Enabled', 1, 0);
pdfview.GetProperty( 'Notifications.NewAnnotAdded.Enabled', vDataOut, 0); //vDataOut = 1
pdfview.OpenDocument(fileName, '', docid, 0);
pdfview.GetProperty( 'Notifications.NewAnnotAdded.Enabled', vDataOut, 0); //vDataOut = 1
//Event 'Notifications.NewAnnotAdded' is working
pdfview.CloseAllDocuments(0);
pdfview.GetProperty( 'Notifications.NewAnnotAdded.Enabled', vDataOut, 0); //vDataOut = 1
pdfview.SetProperty( 'Notifications.Selection.Filter', 'Annotations', 0 );
pdfview.SetProperty( 'Notifications.NewAnnotAdded.Enabled', 1, 0);
pdfview.OpenDocument(fileName, '', docid, 0);
pdfview.GetProperty( 'Notifications.NewAnnotAdded.Enabled', vDataOut, 0); //vDataOut = 1
//Event 'Notifications.NewAnnotAdded' is NOT executed even though property for 'Notifications.NewAnnotAdded.Enabled' = 1
//Each doc loaded in the same viewer instance will NOT execute the event 'Notifications.NewAnnotAdded'