No Bookmarks in Clown, Reader have some?

Markus
2009-04-15
2013-01-26
  • Markus
    Markus
    2009-04-15

    Hi
    I use current 0.7 dll in C#. It's nice.

    I created with MS Word 2007 a pdf file. If I open it with pdf reader I see the bookmarks and i can use them.
    If I open it with pdf clown the bookmark.count is 0. ??

    File file = new File(FileName);
    Document document = file.Document;
    Document.Bookmarks.Count is 0

    I hoped to find a way to get named destinations or create them out of bookmarks, but these are also empty (with several execptions)
    file.Document.Names is also empty, so Names.Destinations does not work.

    regards
    Markus

     
    • Hi Markus

      thank you for your report; in order to make it manageable, please add a bug tracker entry here:
      https://sourceforge.net/tracker/?group_id=176158&atid=876123

      Important: attach to your tracker entry a sample pdf file that causes the bug, so I can reproduce the buggy behaviour.

      About named destinations, there are two aspects to keep in mind:
      1) NamedDestinations is a class derived from NameTree, so it's subject to its current implementation limitations (see source code available in the downloadable distribution): particularly, you can access existing named destinations through its getter method (either java's get(String) or .net's indexer), but at the moment you cannot iterate, add or delete them as these functions are to be implemented yet (I guess the exceptions you saw were NotImplementedException);
      2) 'empty' objects (I think you are referring to *null* objects): the way PDF Clown manages pdf files is governed by some rules (that I'll describe in its user guide to let users better understand how (and why) it plays its game); among them, there's one prescribing that the structure of the original pdf MUST be represented faithfully. So, in case the original file doesn't contain a Names object, file.Document.Names will be null: this behaviour is by-design. If there's no Names object, there obviously won't be a Names.Destinations object too.

      I'm looking forward to your sample file, thank you.
      Stefano