Pdf.js (for node) not rendering entire contents of pdf
问题 I am trying to search the text of of a pdf using https://www.npmjs.com/package/pdfjs-dist-for-node. My code looks like this: gettext: function(){ var data = '../static/example.pdf'; return pdfjs.getDocument(data).then(function(pdf) { var pages = []; for (var i = 0; i < pdf.numPages; i++) { pages.push(i); } return Promise.all(pages.map(function(pageNumber) { return pdf.getPage(pageNumber + 1).then(function(page) { return page.getTextContent().then(function(textContent) { return textContent