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.
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Thu Mar 18, 2021 10:38 am
Hello!
I am trying to run the command
cmd.bp.sortPagesByBookmarks , to sort pages based on the order of the bookmarks.
I'm running it like this from code:
Code: Select all
var cmd = uiInst.CmdManager.Cmds.Find("cmd.bp.sortPagesByBookmarks");
if (cmd == null)
return false;
_Inst.ExecUICmd2(cmd.ID);
but all I get when I run that is a pling, and nothing happens.
If I activate the ribbon toolbar and run it from the bookmark pane, it does work.
How can I run this from code?
I use version 8.0.336
Regards
Ronny
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Thu Mar 18, 2021 12:50 pm
I upgraded the sdk to 8.0.343, but still only a pling when I try to run the command
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Thu Mar 18, 2021 1:33 pm
Hello jusWest,
Have you loaded the BookmarksPlugin correctly?
viewtopic.php?f=66&t=26061&p=101599&hil ... bp#p101588
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Thu Mar 18, 2021 1:39 pm
Yes I think so:
Code: Select all
InitializeComponent();
pdfCtl.SetLicKey(licKey);
pdfCtl.Inst.Settings["General.AppTitle"].v = "TestSDK ";
pdfCtl.Inst.Settings["Commenting.ShowTooltips"].v = false;
pdfCtl.Inst.Settings["Misc.ShowMsgNoOfficeLicense"].v = false;
pdfCtl.Inst.StartLoadingPlugins();
var pluginsPathX86 = AppDomain.CurrentDomain.BaseDirectory + @"Plugins.x86\";
pdfCtl.Inst.AddPluginFromFile(pluginsPathX86 + "Bookmarks.pvp");
pdfCtl.Inst.FinishLoadingPlugins();
And the command is available in the Bookmark pane off the ribbon, and works from there:
bmpluginenabled.PNG
You do not have the required permissions to view the files attached to this post.
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Thu Mar 18, 2021 1:58 pm
I also tried it this way, same result:
Code: Select all
PXV_Inst Inst = new PXV_Inst();
Inst.Init(null, licKey);
Inst.StartLoadingPlugins();
var pluginsPathX86 = AppDomain.CurrentDomain.BaseDirectory + @"Plugins.x86\";
Inst.AddPluginFromFile(pluginsPathX86 + "Bookmarks.pvp");
Inst.FinishLoadingPlugins();
InitializeComponent();
Its just weird, I get a "pling", like when you use a noen existant keyboard shortcut, no error.
And cmd.ID returns a value, so I guess the command exists...
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Fri Mar 19, 2021 7:02 am
Can I send a test project so you can see if I do things correctly?
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Fri Mar 19, 2021 8:33 am
Hello jusWest,
Of course - that would be the best action. Note that you should not include any dev keys there.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Fri Mar 19, 2021 9:00 am
Sasha - Tracker Dev Team wrote: ↑ Fri Mar 19, 2021 8:33 am
Hello jusWest,
Of course - that would be the best action. Note that you should not include any dev keys there.
Cheers,
Alex
Thank you, attached is a testproject that has this behaviour.
Keep in mind, this is SDK version: 8.0.343.0
TestSDKUpgrade.zip
Regards
Ronny
You do not have the required permissions to view the files attached to this post.
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Mon Mar 22, 2021 6:54 am
Sasha - Tracker Dev Team wrote: ↑ Fri Mar 19, 2021 8:33 am
Hello jusWest,
Of course - that would be the best action. Note that you should not include any dev keys there.
Cheers,
Alex
Did you get a chance to look at it?
/Ronny
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Mon Mar 22, 2021 7:47 am
Hello jusWest,
Yup, everything worked for me.
Please doublecheck whether you are opening a document that contains several bookmarks and several pages and that you have the rights to do that operation.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Mon Mar 22, 2021 7:52 am
Hello jusWest,
Also, can you please try doing that with the latest version of the SDK?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Mon Mar 22, 2021 8:20 am
Sasha - Tracker Dev Team wrote: ↑ Mon Mar 22, 2021 7:47 am
Hello jusWest,
Yup, everything worked for me.
Please doublecheck whether you are opening a document that contains several bookmarks and several pages and that you have the rights to do that operation.
Cheers,
Alex
Weird, I have all rights on the dokuments I test with, and can do all other changes to the documents, it has atleast 50 bookmarks in
the documents I test.
As said, this action works if I use the finction via the bookmark ribbon menu, but not when I use the button below the editor.
You did try that button?
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Mon Mar 22, 2021 8:21 am
Sasha - Tracker Dev Team wrote: ↑ Mon Mar 22, 2021 7:52 am
Hello jusWest,
Also, can you please try doing that with the latest version of the SDK?
Cheers,
Alex
I can try that yes
jusWest
User
Posts: 150 Joined: Fri Aug 24, 2018 8:26 am
Post
by jusWest » Mon Mar 22, 2021 8:43 am
jusWest wrote: ↑ Mon Mar 22, 2021 8:21 am
Sasha - Tracker Dev Team wrote: ↑ Mon Mar 22, 2021 7:52 am
Hello jusWest,
Also, can you please try doing that with the latest version of the SDK?
Cheers,
Alex
I can try that yes
AAAND of course that works in the testproject
I have delayed the upgrade because our main project is quite large, but now it seems I have to bite the bullet
Sasha - Tracker Dev Team
User
Posts: 5522 Joined: Fri Nov 21, 2014 8:27 am
Post
by Sasha - Tracker Dev Team » Mon Mar 22, 2021 9:39 am
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ