Open eeh456456 opened 2 years ago
I try to parse a 300 page pdf and get the following content: XXXXXX ----------------Page (0) Break----------------
----------------Page (1) Break----------------
----------------Page (2) Break----------------
----------------Page (3) Break----------------
This is my code:
import PDFParser from "pdf2json"; const pdfParser = new PDFParser(this, 1); function readPDF(fileName) { pdfParser.loadPDF(fileName); pdfParser.on("pdfParser_dataError", errData => console.error(errData.parserError)); pdfParser.on("pdfParser_dataReady", pdfData => { const data = pdfParser.getRawTextContent() console.log('文本信息:', JSON.stringify(data) }); } readPDF('1.pdf')
https://pan.baidu.com/s/1YOGhQgt_jStHEAbjMQO9sg?pwd=mipv
Here is my project and pdf
I try to parse a 300 page pdf and get the following content: XXXXXX ----------------Page (0) Break----------------
----------------Page (1) Break----------------
----------------Page (2) Break----------------
----------------Page (3) Break----------------
This is my code: