Hiding/Disabling Save/Save As in code

PDF-XChange Editor SDK for Developers

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

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: 30
Joined: Thu May 16, 2019 7:44 pm

Hiding/Disabling Save/Save As in code

Post by coblejesse » Thu May 16, 2019 8:22 pm

Hi,

I think i put this in the wrong forum before, the end user forum:

I've been searching through your forums trying to find how to hide or at least disable the Save/ Save As menu options from within code and I'm not finding anything for some reason. I'm seeing how to do it for each user from within the Editor but not from within code. Not sure if I'm searching for the wrong keywords. Can you please point me in the right direction.

Thanks,
-Jesse

User avatar
Sasha - Tracker Dev Team
User
Posts: 4220
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team » Fri May 17, 2019 7:43 am

Hello Jesse,

There is a sample like that in the FullDemo application that comes with the SDK. There is a Commands tab that contains a list of commands - there are buttons to hide and disable them. You can check the code behind them for yourself.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

coblejesse
User
Posts: 30
Joined: Thu May 16, 2019 7:44 pm

Re: Hiding/Disabling Save/Save As in code

Post by coblejesse » Fri May 17, 2019 2:02 pm

Thanks very much Alex! Here is a code sample for anyone looking at this in the future.

public PDFXEdit.IPXS_Inst pxsInst = (PDFXEdit.IUIX_Inst)PDFXEditor.Inst.GetExtension("UIX");

public void TurnOffCmd(string cmd, bool isOff)
{
PDFXEdit.IUIX_Cmd iuixCmd = uiInst.CmdManager.Cmds.Find(cmd);
if (iuixCmd == null)
return;
iuixCmd.Offline = isOff;
}

User avatar
Sasha - Tracker Dev Team
User
Posts: 4220
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team » Fri May 17, 2019 2:04 pm

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

coblejesse
User
Posts: 30
Joined: Thu May 16, 2019 7:44 pm

Re: Hiding/Disabling Save/Save As in code

Post by coblejesse » Mon May 20, 2019 5:34 pm

Hi,

So after speaking with my boss further, he would rather instead of just disabling the commands, would like to hide them, and then instead of "Save Copy As..." he would like "Export Copy As...". Is there any way to hide the Save commands we don't want, and then change the wording of "Save Copy As..." to "Export Copy As..."?

Image

Thanks,
Jesse

User avatar
Sasha - Tracker Dev Team
User
Posts: 4220
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team » Tue May 21, 2019 7:40 am

Hello Jesse,

There are properties that you require described here:
https://sdkhelp.tracker-software.com/view/PXV:IUIX_Cmd

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

coblejesse
User
Posts: 30
Joined: Thu May 16, 2019 7:44 pm

Re: Hiding/Disabling Save/Save As in code

Post by coblejesse » Tue May 21, 2019 2:41 pm

Thanks Alex, but can you please show an example on how to use these properties in c# or even vb? Once I see an example things always become a lot clearer.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4220
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team » Tue May 21, 2019 2:44 pm

Hello Jesse,

Looks like you have used the Offline property - all of them are documented for this interface.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply