0 Replies Latest reply on Nov 26, 2010 4:45 AM by Souslesmers

    HTML to PDF with bookmark <h1> to <h6>

    Souslesmers

      Hi,

       

      I convert HTML page to PDF doc with Acrobat 10 pro and

      the different styles of headings in HTML <h1> to <h3>

      are not converted to a hierarchical bookmarks structure !?!

      My HTML page content more than 1300 articles like this :

       

      <h1>Title</h1>...

        <h2>Subtitle<h2>...

          <h3>Article</h3>...

       

      Bookmark generate by Acrobat:

       

      Title 1

      Subtitle 1

      Article a

      Article b

      Subtitle 2

      Article c

      Title 2

      ...

       

      I would like to convert the different styles of headings in HTML to a hierarchical bookmarks structure like this:

       

      Title 1

      - Subtitle 1

      -- Article a

      -- Article b

      - Subtitle 2

      -- Article c

      Title 2

      ...

       

      I found a script to create basic bookmark:

       

      var myRoot = this.bookmarkRoot;
      myRoot.createChild("A");
      myRoot.createChild({cName: "B", nIndex: 1});
      myRoot.createChild({cName: "C", nIndex: 2});
      for (var i = 0; i < myRoot.children.length; i++) {
      var child = myRoot.children[i];
      for (var j = 0; j < 3; j++) {
      var name = child.name + j;
      child.createChild({cName: name, nIndex: j});
      }
      }

       

      but I don't know

      How to create bookmark with <h1> to <h3> level, please ?

       

      Thanks for your help !

      Regards