Retrieve Page from IPXC Bookmark in Pdf Document

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Sean - Tracker, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, 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
Posts: 5
Joined: Mon Jul 24, 2023 6:50 am

Retrieve Page from IPXC Bookmark in Pdf Document

Post by RudiRo »

Hello Tracker Support Team,

I am trying to read Bookmarks from PDF and retrieving its Page-Number.

To retrieve the Page-Number right now, i am using a workaround to include the page-number in the title of the bookmark. Because the Bookmark-Title is acessible from the IPXC_Bookmark object.

The Bookmarks look like this:

Page:1 Title
Page:5 Title2
Page:10 Title3

Sample Code below:

var pxcInst = (PDFXEdit.IPXC_Inst)m_PdfInst.GetExtension("PXC");
m_Document = pxcInst.OpenDocumentFromFile(@"PathToSampleDocument", null);
uint ct = 0;
IPXC_Bookmark bookmark;
while (ct < m_Document.BookmarkRoot.ChildrenCount)
if (ct == 0)
bookmark = m_Document.BookmarkRoot.FirstChild;
bookmark = m_Document.BookmarkRoot.Next;


I want to split a self created PDF-Document with Bookmarks, the PageNumber of the Bookmarks can be different depending on the size of the Pdf-File. In the example above i would define the PagesRange like this:
Giving me 3 Documents depending on the Bookmarks.

It's working using the workaround, but i am wondering if there is a method to retrieve the Page-Number directly from the IPXC_Bookmark object. And i don't have to use the Bookmark Title as a workaround.

Thanks in Advance

Posts: 1325
Joined: Thu Sep 05, 2019 12:35 pm

Re: Retrieve Page from IPXC Bookmark in Pdf Document

Post by zarkogajic »

Hi Rudi,

A bookmark can have actions or not. If not, when you click it - nothing happens. ... rk_Actions

If there are actions assigned, those actions can do various things. ... ctionsList ... sList_Item ... PXC_Action ... ction_Type

A type of an action can be "Go to a page in the same document" - this is probably the one you are talking about.

If it is, then ... ction_Goto and ... _Goto_Dest and ... estination "nPageNum" gives you the target page.

For how to check the type of an action and how to cast the action to its type and get the destination: search this forum ...

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

Re: Retrieve Page from IPXC Bookmark in Pdf Document

Post by Tracker Supp-Stefan »

Hello zarkogajic,

Many thanks for the above post and detailed help!

@RudiRo - please do let us know if the above helped!

Kind regards,
Post Reply