Page 1 of 1

Bookmarks

Posted: Fri Oct 27, 2017 11:08 am
by tag68
Hi

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

Tom

Re: Bookmarks

Posted: Fri Oct 27, 2017 11:23 am
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

Re: Bookmarks

Posted: Fri Oct 27, 2017 1:35 pm
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

Re: Bookmarks

Posted: Mon Oct 30, 2017 8:30 am
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

Re: Bookmarks

Posted: Mon Oct 30, 2017 11:13 am
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