You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using parseFileItems() method to parse a pdf as same as the code in pdfreader/parse.js.
But the callback has been called only once (where only item.file has value). No error has been throw.
When i pass the { debug: true } to the constructor of pdfreader, a stacktrace shows up.
Is this a bug or am I using it wrong?
➜ pdfreader node parse.js ~/Desktop/test.pdf
printing raw items from file: /Users/dss886/Desktop/test.pdf ...
file = /Users/dss886/Desktop/test.pdf
Warning: Setting up fake worker.
Warning: Unhandled rejection: ReferenceError: MozBlobBuilder is not defined
ReferenceError: MozBlobBuilder is not defined
at Object.createBlob (eval at <anonymous> (/Users/dss886/Workspace/Scripts/billing/node_modules/pdf2json/lib/pdf.js:64:1), <anonymous>:1104:12)
at Object.createObjectURL (eval at <anonymous> (/Users/dss886/Workspace/Scripts/billing/node_modules/pdf2json/lib/pdf.js:64:1), <anonymous>:1112:24)
at JpegStream_getIR [as getIR] (eval at <anonymous> (/Users/dss886/Workspace/Scripts/billing/node_modules/pdf2json/lib/pdf.js:64:1), <anonymous>:25575:18)
at PartialEvaluator_buildPaintImageXObject [as buildPaintImageXObject] (eval at <anonymous> (/Users/dss886/Workspace/Scripts/billing/node_modules/pdf2json/lib/pdf.js:64:1), <anonymous>:7120:64)
at PartialEvaluator_getOperatorList [as getOperatorList] (eval at <anonymous> (/Users/dss886/Workspace/Scripts/billing/node_modules/pdf2json/lib/pdf.js:64:1), <anonymous>:7464:24)
at Object.eval [as onResolve] (eval at <anonymous> (/Users/dss886/Workspace/Scripts/billing/node_modules/pdf2json/lib/pdf.js:64:1), <anonymous>:4348:26)
at Object.runHandlers (eval at <anonymous> (/Users/dss886/Workspace/Scripts/billing/node_modules/pdf2json/lib/pdf.js:64:1), <anonymous>:864:35)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)
Other information:
Run npm test: All tests passed
Run node parse.js test/sample.pdf: All content of sample pdf printed
Version: pdfreader 1.2.14, pdf2json 1.2.5
The text was updated successfully, but these errors were encountered:
By @copmerbenjamin:
* Update pdf2json to version 2
MozBlobBuilder is not defined in newer versions of node, pdf2json 2 resolves this but drops node versions below 14 (#101, #103, #114)
* BREAKING CHANGE: drop support for Node.js < 14
* Increase ecmaVersion, according to node.js version upgrade
I'm using
parseFileItems()
method to parse a pdf as same as the code inpdfreader/parse.js
.But the callback has been called only once (where only item.file has value). No error has been throw.
When i pass the
{ debug: true }
to the constructor of pdfreader, a stacktrace shows up.Is this a bug or am I using it wrong?
Other information:
npm test
: All tests passednode parse.js test/sample.pdf
: All content of sample pdf printedThe text was updated successfully, but these errors were encountered: