bookmark goto action

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
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

bookmark goto action

Post by jusWest »

Hi!

When adding a bookmark via the INS key or executing "cmd.addBookmark", the page that is bookmarked is jumped to
and shown in the same position as it was bookmarked. Can I set some default setting so that the page is always shown
based on Dest_XYZ ( Top of page in Top of editor...)

We have a goto page function and are using this, and it works for that function:

Code: Select all

dest.nType = PXC_DestType.Dest_XYZ;
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: bookmark goto action

Post by jusWest »

scratch this, wrote a routine using op.bookmarks.addNew.simple to accomplish this.

One thing though, I know I can catch the INS key in a custom event handler, and call my add bookmark routine there.

But is there a way to stop the default behaviour for the INS key from executing, what event do i need to catch to do this?

regards
Ronny
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: bookmark goto action

Post by jusWest »

Any help?

I use this

Code: Select all

            int nID = _Inst.Str2ID("op.bookmarks.addNew.simple", false);
            IOperation Op = _Inst.CreateOp(nID);
            ICabNode input = Op.Params.Root["Input"];

            // if bookmark has an action, add as a sibling, else add as a child
            IPXC_Bookmark Book;
            if (bmSelected.Actions != null)
                Book = bmSelected.AddNewSibling(true);
            else
                Book = bmSelected.AddNewChild(true);

            //IColor color = Book.Color;
            //color.SetRGB(0.5f, 0.1f, 1.0f);
            //Book.Color = color;
            Book.Opened = true;
            IPXC_ActionsList AL = _Doc.CoreDoc.CreateActionsList();
            PXC_Destination dest = new PXC_Destination();
            dest.nPageNum = targetPage;
            dest.nNullFlags = 15;
            dest.nType = PXC_DestType.Dest_XYZ;
            AL.AddGoto(dest);
            Book.Actions = AL;
            Book.Title = "uten tittel";
            input.Add().v = Book;

            Op.Do();
to create a bookmark from my own menu, but I also want this routine to execute, instead of the default behaviour, when I press the INS button on the keyboard.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: bookmark goto action

Post by Sasha - Tracker Dev Team »

Hello Ronny,

You will need to handle the cmd.bookmarksView.new command - it's being executed via the INS key.

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