code: function convertItems(items)
                          {
                              if (!items || items.length <= 0)
                                  return;
  
                              items.forEach(function (item) {
                                  getPageIndex(item).then(
                                          function (pageIndex) {
                                              if (pageIndex != null)
                                                  item.pageIndex = pageIndex;
                                              else
                                                  delete item.pageIndex;
                                          },
                                          function (error) {
                                              log.error(
                                                      "cannot determine page index for outline item",
                                                      item, error);
                                              delete item.pageIndex;
                                          }
                                  );
                                  convertItems(item.items);
                              });
                          }
docs: /* raw outline is structured like this:
  [
  {
  title: string,
  bold: boolean,
  italic: boolean,
  color: rgb Uint8Array,
  dest: dest obj,
  url: string,
  items: array of more items like this
  },
  ...
  ]