Search code examples
c#pdfsharp

View outlines(bookmarks) of a pdf


I created a PDF file with library PDFsharp with this code. I open the file with Adobe Reader and the bookmarks are created. Then I created another program when I read this created PDF file and I want to view my bookmarks but the Outlines collection Count is 0 and HasOutline is false. Is it a bug?
Do you have tried to display the bookmarks of a PDF?

Sorry for my English


Solution

  • It's a known limitation that the Outlines collection remains empty when you open an existing document.

    You can access the outlines using GetObject() if you have to.

    See also:
    http://forum.pdfsharp.net/viewtopic.php?p=705#p705
    http://forum.pdfsharp.net/viewtopic.php?p=1008#p1008