PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)
Moderators:PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
Tracker Supp-Stefan wrote:
[...] you need to exit the comment box/typewriter/text area tool before the document is flagged as modified.
the viewer is placed within a tab. If the user wants to close the tab, I have to check if the doc is modified.
Therefore I have to get the right state before closing the the tab because otherwise changes would get lost...
I just did a simple test in the end user Viewer - and I presume the same will work in the AX (could test it a bit later if I have a minute) - is that even if I've only opened a document -and then started a typewriter annotation - the file is not flagged as modified - but when I try to close it - I do get the ConfirmDocumentSave prompt - so I believe that you should still be able to capture any document modifications - even if a notification is not sent before the user exists the comment field.
Tracker Supp-Stefan wrote:I do get the ConfirmDocumentSave prompt - so I believe that you should still be able to capture any document modifications - even if a notification is not sent before the user exists the comment field.
I don't allow the user to close the document manually. Because the viewer is located in a tab control, I handle all on my own. The user won't get any prompt from the viewer.
I tried to get the "Prompts.ConfirmDocumentSave" and cancel it using SetProperty("Prompts.ConfirmDocumentSave.Cancel", 1) to avoid the prompt and just raise my own modified-event. But the cancel did not work. The prompt is still shown.
How does the Save-Button gets notified when typing in a textbox?
ConfirmDocumentSave is a group object, and you will need to set the UserChoise value.
The proper syntax would be:
SetProperty("Prompts.ConfirmDocumentSave.UserChoice", DataIn(2), 0);
or
SetProperty("Prompts.ConfirmDocumentSave.UserChoice", DataIn("Cancel"), 0);
nevertheless I could implement the workaround using "ConfirmDocumentSave"
will you implement raising the Modified-Event to be notified like your save-command?