Hi,

I am new to the PoDoFo library.

Here I am getting bookmark information from PDF file by using PoDoFo Library, 
but I don't know how to get destination details from pdfDestination/pdfAction 
object.

PdfMemDocument *pdfDoc = new 
PdfMemDocument("C:\\Users\\dineshkumar.r\\Documents\\Bookmarks - 691.pdf");
       PdfOutlines* outlines = pdfDoc->GetOutlines();
       PdfOutlineItem* root = outlines->First();
       PdfOutlineItem* outline = outlines->First();

       while(outline != NULL)
       {
              PdfString title = outline->GetTitle();
              printf("Outline Title %s", title.GetString());
              PdfDestination* des = outline->GetDestination(pdfDoc);
              if(des != NULL)
              {
                     PdfPage* page = des->GetPage(&pdfDoc->GetObjects());
                     if(page != NULL)
                           int pageNo = page->GetPageNumber();
              }
              else
              {
                     PdfAction* action = outline->GetAction();
                     EPdfAction actionType = 
(EPdfAction)action->GetType();//ePdfAction_GoTo
                     PdfObject *object = action->GetObject();
                     PdfDictionary dictionary = object->GetDictionary();
                     if(action->HasScript())
                     {
                           PdfString script = action->GetScript();
                     }
                     if(action->HasURI())
                     {
                           PdfString s = action->GetURI();
                     }
              }
              outline = root->Next();
       }

Kindly help me to resolve the issues with my code.

Regards,
Dinesh


::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information 
could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in 
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on 
the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the 
author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, 
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written 
consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please 
delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and 
other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to