Differentiate between a Save and Save As Event

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

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.
Post Reply
coblejesse
User
Posts: 34
Joined: Thu May 16, 2019 7:44 pm

Differentiate between a Save and Save As Event

Post by coblejesse »

Hi Tracker,

I found this code in another forum post and it works good in catching the save event on any Save command:

if (e.nEventID == nIDS[(int)IDS.e_document_performSave])
{
//Do your stuff
//...
//If the document should not be saved then we break
{
//...
e.pEvent.Result = 0; //Also we can send the E_FAIL (0 means S_OK) or some other error message so that it would be displayed in the error message box

}
}

But is there a way to differentiate between when a user hits Save and Save As in the file menu?

Thanks,
Jesse
coblejesse
User
Posts: 34
Joined: Thu May 16, 2019 7:44 pm

Re: Differentiate between a Save and Save As Event

Post by coblejesse »

Actually I figured this out. I just implemented the PdfEditorCommandHandler that was provided in the following link https://sdkhelp.pdf-xchange.com/vi ... md_Handler for the cmd.save IUIX_Cmd. That was extremely useful, thanks.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Differentiate between a Save and Save As Event

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply