Hello,

Thanks for your bug report. I commited a fix to SVN (trunk and branch). Please 
update your copy of PoDoFo.

best regards,
        Dom

Am Freitag, 30. Mai 2008 schrieb flaviano petrocchi:
> Hi, I have problems with outlines, i can create an outline in an
> existing pdf using something like:
>
> PdfOutlines * p_outlines = doc.GetOutlines(true);
> PdfDestination outline_dest(doc.GetPage(mark.page-1));
> doc.AddNamedDestination(outline_dest, string(mark.name));
> PdfOutlineItem * item = p_outlines->CreateRoot(mark.name);
> item->SetDestination(outline_dest);
>
> and works fine. The problem is when i try to get information about
> outlines using code taken from the
> pdfinfo example
>
> void PdfInfo::OutputOutlines( std::ostream& sOutStream,
> PoDoFo::PdfOutlineItem* pItem, int level )
> {
>     PoDoFo::PdfOutlines* pOutlines;
>     int          i;
>
>     if( !pItem )
>     {
>         pOutlines = mDoc->GetOutlines( PoDoFo::ePdfDontCreateObject );
>         if ( !pOutlines ) {
>             sOutStream << "\tNone Found" << std::endl;
>             return;
>         }
>         pItem     = pOutlines->First();
>     }
>
>     for( i=0;i<level;i++ )
>         sOutStream << "-";
>
>     sOutStream << ">" << pItem->GetTitle().GetString();
>     PoDoFo::PdfDestination* pDest = pItem->GetDestination();
>     if ( pDest ) {    // then it's a destination
>
>         PoDoFo::PdfPage* pPage = pDest->GetPage();
>         if( pPage )
>             sOutStream << "\tDestination: Page #" <<
> pPage->GetPageNumber(); else
>             sOutStream << "\tDestination: Page #" << "???";
>
>     } else {          // then it's one or more actions
>         sOutStream << "\tAction: " << "???";
>     }
>     sOutStream << std::endl;
>
>     if( pItem->First() )
>         this->OutputOutlines( sOutStream, pItem->First(), level+1 );
>
>     if( pItem->Next() )
>         this->OutputOutlines( sOutStream, pItem->Next(), level );
> }
>
> Here  pDest->GetPage(); never get a valid page, any idea of what is going
> on?
>
> Thanks for your help.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users



-- 
**********************************************************************
Dominik Seichter - [EMAIL PROTECTED]
KRename  - http://www.krename.net  - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to