Knowledge Base - How to add elements to the TOC

Knowledge Base - How to add elements to the TOC

If you have a premium license, you can manipulate the PDF outline (TOC), the below example shows how to add a root element and then add children to it.

 

float top = m_doc.GetPageHeight(0);
bool ret = m_doc.AddRootOutline("Bookmarks", 0, top);
if (ret)
      {
             PDFOutline ol = m_doc.GetRootOutline();
             ol.AddChild("Page 1", 0, top * 5 / 6);
             PDFOutline ol1 = ol.GetChild();
             ol1.AddNext("Child1", 0, top / 2);
       }

m_doc.Save();
Applies To

RadaeePDF SDK for Windows 10

Details

Created : 2018-03-20 08:54:21, Last Modified : 2018-03-20 08:55:13