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 parse pdf, no dataError #373

Closed
simowaer opened this issue Nov 12, 2024 · 0 comments
Closed

Unable to parse pdf, no dataError #373

simowaer opened this issue Nov 12, 2024 · 0 comments

Comments

@simowaer
Copy link

broken.pdf

Input:

import fs from "fs";
import PDFParser from "pdf2json";

const pdfParser = new PDFParser();

pdfParser.on("pdfParser_dataError", (errData) =>
	console.error(errData.parserError)
);
pdfParser.on("pdfParser_dataReady", (pdfData) => {
	fs.writeFile(
		"./broken.json",
		JSON.stringify(pdfData),
		(data) => console.log(data)
	);
});

pdfParser.loadPDF("./broken.pdf", 10);

Output:

Info: about to load PDF file ./broken.pdf
Info: Load OK: ./broken.pdf
Warning: Setting up fake worker.
Info: PDF loaded. pagesCount = 1
Info: start to parse page:1
Info: Skipped: tiny fill: 0 x 0
modesty added a commit that referenced this issue Dec 28, 2024
…g after page operator list is resolved, add i373_err_broken.pdf to verify
modesty added a commit that referenced this issue Dec 28, 2024
…g after page operator list is resolved, add i373_err_broken.pdf to verify (#378)
@modesty modesty closed this as completed Dec 29, 2024
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

2 participants