Hello again

I keep hammering on about PdfDestinations. Somewhat related issue to the 
earlier ones I had is that I've got a PDF where PoDoFo returns NULL with 
GetPage() for destinations from the document's outline. You can find the PDF 
showing this type of behaviour from this URL:
http://events.ccc.de/congress/2008/Fahrplan/attachments/1206_ocat_25c3_r396.pdf

I've tried getting at the page numbers with the following code after noticing 
that GetPage() with these PdfDestination*s returns NULL:

PdfObject *dObj = destination->GetObject(); //destination is a PdfDestination* 
returned by the PDF outline item's GetDestination() method. The title and 

if (dObj && dObj->GetDataType() == ePdfDataType_Name) {
                PdfName name = dObj->GetName();

                PdfNamesTree *namesTree = doc->GetNamesTree();
                if (!namesTree) return;
                
                PdfString nameStr = PdfString(name.GetEscapedName()); //this is 
of the expected form, etc "section.1"
                
//this is reached and returns NULL for all items in the above PDF's outline. 
I've also tried without escaping the name, same result.
//not sure which one's the correct form (escaped or non-escaped, would be good 
to clarify this in documentation)
                PdfObject *destObj = 
namesTree->GetValue(PdfName("Dests"),namesStr); 

                //... code that deals with the destinations ...
        }
}

Any ideas of what I should do to get the page numbers for these offending PDF 
destinations?

Cheers
Matias
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to