Refactor of pdf-text.
Extracts text from a PDF and returns an array of pages that each contains an array of text lines extracted from that page.
$ yarn add pdf-text2
const PDFText = require('pdf-text2');
var pathToPdf = __dirname + "/info.pdf"
const pdfText = new PDFText(pathToPdf);
const pages = pdfText.parse();