Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find other page content #280

Open
eeh456456 opened this issue Oct 9, 2022 · 2 comments
Open

Unable to find other page content #280

eeh456456 opened this issue Oct 9, 2022 · 2 comments

Comments

@eeh456456
Copy link

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')
@eeh456456
Copy link
Author

https://pan.baidu.com/s/1YOGhQgt_jStHEAbjMQO9sg?pwd=mipv

Here is my project and pdf

@eeh456456
Copy link
Author

QQ图片20221010160000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant