2 Replies Latest reply on Sep 15, 2008 2:08 AM by SASELVA

    Removing Level of Bookmarks in PDF

    SASELVA Level 1
      I have sample script to retrive all bookmarks in the PDF document and I had modified to remove level of bookmarks, but this script works only one child and throws an error as bkm.children has no properties. Any correct me the logic to remove Level bookmarks

      Exception: bkm.children has no properties
      function DumpBookmark(bkm, nLevel)
      var s=""
      for (var i = 0; i < nLevel; i++)
      s += " ";
      if (bkm.children != null)
      for (var i = 0; i < bkm.children.length; i++)
      DumpBookmark(bkm.children[i], nLevel + 1);
      DumpBookmark(this.bookmarkRoot, 0);