Topic: Generating bookmarks in pdf file

(Bookmarks: that clickable list that is possible to see for some documents in pdf readers.)

I am thinking of using ghostscript to add bookmarks to the pdf exported from QET, using this method i found now:
http://ask.xmodulo.com/add-bookmarks-pd … linux.html
It is use ghostscript to add a list of pages and titles from a text file.

I wonder if someone more fluent in this subject can help with a simple script to generate that list from the qet file... Something like

For each line starting with  <diagram indexrev=" , parse that line and:
   Start to output a line, starting with  [Page
   add page number retrieved from the order="" field (with space added to both sides of number)
   add[color=#3366ff] /Title ([/color]

   add the title retrieved from the title="" field
   add ) /OUT pdfmark and linefeed.

If we can automate that, including afterwards running the ghostscript command in a script it wild be really nice.

OK even better if integrated in QET of course nomicons/wink