pdf2json icon indicating copy to clipboard operation
pdf2json copied to clipboard

TypeError: infoDict.has is not a function

Open ElModdy opened this issue 6 years ago • 2 comments
trafficstars

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

ElModdy avatar Apr 26 '19 09:04 ElModdy

please upload your testing PDF

modesty avatar Nov 20 '21 18:11 modesty

Hi @modesty / @ElModdy, I'm unsure if this is the same issue, but I think it is.

I put an example pdf in a gist here:

https://gist.github.com/paulroth3d/9b47d9edc776f7243582da65961bbd79

I did notice, that the problem may have something to do with multiple pages in pdfs.

Once I extracted out the page I wanted from the PDF, then the issue went away.

paulroth3d avatar Dec 28 '22 15:12 paulroth3d