Hiding/Disabling Save/Save As in code

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

Hiding/Disabling Save/Save As in code

Post by coblejesse »

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
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team »

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
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
coblejesse
User
Posts: 34
Joined: Thu May 16, 2019 7:44 pm

Re: Hiding/Disabling Save/Save As in code

Post by coblejesse »

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;
}
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
coblejesse
User
Posts: 34
Joined: Thu May 16, 2019 7:44 pm

Re: Hiding/Disabling Save/Save As in code

Post by coblejesse »

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
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team »

Hello Jesse,

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

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
coblejesse
User
Posts: 34
Joined: Thu May 16, 2019 7:44 pm

Re: Hiding/Disabling Save/Save As in code

Post by coblejesse »

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.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Hiding/Disabling Save/Save As in code

Post by Sasha - Tracker Dev Team »

Hello Jesse,

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

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply