Bookmarks

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
tag68
User
Posts: 8
Joined: Fri Oct 27, 2017 10:28 am

Bookmarks

Post by tag68 »

Hi

I'm trying to figure out how to go to the page that a bookmark points to.

Tom
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17823
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Bookmarks

Post by Tracker Supp-Stefan »

Hello Tom,

One way would be to run a small JS with a bookmark.execute() method as explained on page 179 of this file:
JS API Reference

And I am now asking my colleagues from the dev team if it can be done with Editor SDK methods directly.

Cheers,
Stefan
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Bookmarks

Post by Sasha - Tracker Dev Team »

Hello Tom,

To do this via the SDK - just execute the Go To Bookmark command cmd.bookmarksView.goto via the https://sdkhelp.pdf-xchange.com/vie ... _ExecUICmd method.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
tag68
User
Posts: 8
Joined: Fri Oct 27, 2017 10:28 am

Re: Bookmarks

Post by tag68 »

Thank you,

I'm also wondering if you can get the page number and the title of the bookmark?

I want to stamp the bookmark title on the page to the bookmark.

PDFXEdit.ICabNode options = Op.Params.Root["Options"]
             options ["PagesRange.Type"]. v = 'BookmarkPage'
             options ["RightHeaderText"]. v = "<< Bates Number # 4 # 1 #" + BookmarkTitle + "# >>";



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

Re: Bookmarks

Post by Sasha - Tracker Dev Team »

Hello Tom,

Of course you can get that (if there is one). First get the IPXV_BookmSelection from the IPXV_DocSelection that you can obtain by using the IPXV_Document::GetSel method:

Code: Select all

int nSel = pdfCtl.Inst.Str2ID("selection.bookmarks");
PDFXEdit.IPXV_DocSelection docSel = pdfCtl.Doc.GetSel(nSel);
Then you will have the IPXC_Bookmark list from which you can get titles and action lists.

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