-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get a response while parsing a PDF file that contains image. #101
Comments
In order for us to reproduce and investigate, can you share your PDF file and JS code, please? |
Please find the JS code & Sample File. PDF File - JS Code -
|
Thank you! I'll try to find some time to test this. In the meantime, anybody can feel free to give it a go! |
To investigate, I've tried parsing that file with the diff --git a/parse.js b/parse.js
index 02100cb..ab0c9e4 100644
--- a/parse.js
+++ b/parse.js
@@ -2,7 +2,7 @@ var LOG = require("./lib/LOG.js").toggle(false);
var PdfReader = require("./index.js").PdfReader;
function printRawItems(filename, callback) {
- new PdfReader().parseFileItems(filename, function (err, item) {
+ new PdfReader({ debug: true }).parseFileItems(filename, function (err, item) {
if (err) callback(err);
else if (!item) callback();
else if (item.file) console.log("file =", item.file.path); => Here's what I'm getting:
This error is referenced on |
After upgrading
=> If you want to upgrade that dependency in that project, add the following lines in your
|
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
While processing a PDF file that contains image then my backend node service fails. I've tried some work arounds, but the service just fails every time. Please help me resolve this issue.
pdfreader version - 1.2.14
Node Version - 16.13.0
Used File - pdfReaderIssue.pdf
Note : I tried with lower version of nodeJs. It's working till version 16.6.2.
The text was updated successfully, but these errors were encountered: