Open AdamMarciniak opened 3 years ago
Hi, It seems to be an error caused by the class not being declared correctly. I think you should change your code like this:
var Pdf2json = require('form-pdf2json');
var pdf2Json = new Pdf2Json();
console.log(pdf2json.convertPdf2Json('formExample.pdf'));
It's been a while since I've seen this code, so I need to check it a lil bit. 😅 But anytime ask me if you have any questions.
Hi tried using the code above @ClareKang:
var Pdf2json = require('form-pdf2json'); var pdf2Json = new Pdf2Json(); console.log(pdf2json.convertPdf2Json('./test.pdf'));
but i got an error:
node:internal/fs/utils:344 throw err; ^ Error: ENOENT: no such file or directory, scandir 'files/'
what can i do to resolve it?
Same issue here
I'll check this issue again
Similar issue for me.
With the following:
var pdf2json = require("form-pdf2json");
pdf2json.convertPdf2Json("/Users/steveharman/sampleForm.pdf");
pdf2json.exportPdf2Json("/Users/steveharman/sampleForm.json");
When I issue node ./myscript.js
(that ^^) I get:
Error: ENOENT: no such file or directory, scandir 'files/'
Thanks
I've got code like so:
And it gives me :
TypeError: pdf2json.convertPdf2Json is not a function
Is there something I can do to fix this?