code: function forEachItem(pdf, handler) {
    var pageNumber = 0;
    for (var p in pdf.formImage.Pages) {
      var page = pdf.formImage.Pages[p];
      var number = ++pageNumber;
      handler(null, {
        page: number,
        width: pdf.formImage.Width,
        height: pdf.formImage.Pages[number - 1].Height
      });
      for (var t in page.Texts) {
        var item = page.Texts[t];
        item.text = decodeURIComponent(item.R[0].T);
        handler(null, item);
      }
    }
    handler();
  }
docs: doc: https://github.com/modesty/pdf2json