Skip to content

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

@linto17

Description

@linto17

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions