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

when passing an invalid buffer to PdfReader, an error should be returned. #306

Open
linto17 opened this issue Jun 22, 2023 · 0 comments
Open

Comments

@linto17
Copy link

linto17 commented Jun 22, 2023

The code and the pdf file are attached.

  import PDFParser from "pdf2json";
  var pdfParser = new PDFParser();
  pdfParser.on("pdfParser_dataError", console.log);
  pdfParser.on("pdfParser_dataReady", console.log);
  var verbosity = 1;
  pdfParser.loadPDF("./test-pdf.pdf", verbosity);
  setTimeout(() => console.log("does not display"), 1000);

test-pdf.pdf

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