modesty / pdf2json

converts binary PDF to JSON and text, for server-side PDF processing and command-line use.

Home Page:https://github.com/modesty/pdf2json

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

linto17 opened this issue · comments

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