code: function readToken(data, offset) {
          var token = '', ch = data[offset];
          while (ch !== 13 && ch !== 10) {
            if (++offset >= data.length) {
              break;
            }
            token += String.fromCharCode(ch);
            ch = data[offset];
          }
          return token;
        }
docs: Simple scan through the PDF content to find objects, trailers and XRef streams.