TypeError: infoDict.has is not a function

Open
#186 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js
Domain
backend

Research direction

The trace points into node_modules/pdf2json/lib/pdf.js, at PDFDocument.get documentInfo. Start by reproducing the error with the affected PDF and inspect that getter and the parser path; no fixture, entry-point source, or test is provided in the issue, so completion criteria need to be established before implementation.

Written by the indexing model from the issue text.

Description

TypeError: infoDict.has is not a function
at PDFDocument.get documentInfo [as documentInfo] (eval at (/home/usr/repos/Work1/node_modules/pdf2json/lib/pdf.js:64:1), :4638:24)
at LocalPdfManager_ensure [as ensure] (eval at (/home/usr/repos/Work1/node_modules/pdf2json/lib/pdf.js:64:1), :32503:22)
at LocalPdfManager.BasePdfManager_ensureModel [as ensureModel] (eval at (/home/usr/repos/Work1/node_modules/pdf2json/lib/pdf.js:64:1), :32442:19)
at Object.parseSuccess [as onResolve] (eval at (/home/usr/repos/Work1/node_modules/pdf2json/lib/pdf.js:64:1), :27104:38)
at Object.runHandlers (eval at (/home/usr/repos/Work1/node_modules/pdf2json/lib/pdf.js:64:1), :864:35)
at listOnTimeout (internal/timers.js:535:17)
at processTimers (internal/timers.js:479:7)
An error occurred while parsing the PDF: infoDict.has is not a function
An error occurred while parsing the PDF: infoDict.has is not a function

Dominant language
Java
Stars
2.2k
Forks
396
Avg merge
9d 19h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modesty/pdf2json

All issues in modesty/pdf2json

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.