Hi,
How can I know if the document was modified and need to be saved (document was rotated,notes added,fields modified...)
Nir
detect if document is dirty (need to be saved)
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 22
- Joined: Wed May 15, 2013 9:46 am
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am
Re: detect if document is dirty (need to be saved)
Hello Nir,
Please check section 2.2.2.4.1 of the Viewer AX SDK - you need to check the "Objects.Documents.<item>.Modified" flag.
Cheers,
Stefan
Please check section 2.2.2.4.1 of the Viewer AX SDK - you need to check the "Objects.Documents.<item>.Modified" flag.
Cheers,
Stefan
-
- User
- Posts: 33
- Joined: Tue Apr 17, 2012 10:33 am
Re: detect if document is dirty (need to be saved)
Hi,
i tryed this property, but when the user is editing a form field, as long as the field has focus the property returns false (0).
Is there a property that will return true after the user pressed the first key?
(the save button in the viewer has this behavior)
Kind regards
Peter
i tryed this property, but when the user is editing a form field, as long as the field has focus the property returns false (0).
Is there a property that will return true after the user pressed the first key?
(the save button in the viewer has this behavior)
Kind regards
Peter
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am
Re: detect if document is dirty (need to be saved)
Hi Peter,
I will need to check that with our forms expert. Will get back to you when I have more info.
Regards,
Stefan
I will need to check that with our forms expert. Will get back to you when I have more info.
Regards,
Stefan
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am
Re: detect if document is dirty (need to be saved)
Hi Peter,
This has been passed to a colleague from the dev team (Vasyl) and I will post back here when I have further news.
Best,
Stefan
This has been passed to a colleague from the dev team (Vasyl) and I will post back here when I have further news.
Best,
Stefan
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: detect if document is dirty (need to be saved)
Hi, Peter.
HTH
Sorry, no easy way for this currently. But you may try to do it by:i tryed this property, but when the user is editing a form field, as long as the field has focus the property returns false (0).
Is there a property that will return true after the user pressed the first key?
(the save button in the viewer has this behavior)
Code: Select all
youreventhandler OnEvent(type, name, ..)
{
if ( (type == PXCVA_OnNamedNotify) AND (name == "Global::OperationsHistoryChanged")
OR
(type == PXCVA_OnPropertyChanged) AND (StrStr(name, "].Modified") != NULL) // "Documents[<DocID>].Modified"
)
{
int cmdSaveState = 0;
pdfViewer.GetProperty("Commands[\"Save\"].State", out cmdSaveState, 0);
bool isDirty = (cmdSaveState == 1);
}
}
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.