Unable to find other page content
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 394
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 7
Description
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')
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the reported 300-page PDF and the shown pdfParser.loadPDF and getRawTextContent calls. Inspect how pdfParser_dataReady assembles page content and compare the returned text with the page breaks; done means the expected content from all pages is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100