ecarter / node-pdfinfo

A simple api for reading PDF meta info via xpdf's pdfinfo(1)
4 stars 8 forks source link

Error in pdfinfo.js #6

Open 1Map opened 4 years ago

1Map commented 4 years ago

Crashes with following message:

TypeError: lines[i].split is not a function
    at parse (/home/schalk/onemapnginx/node_modules/pdfinfo/lib/pdfinfo.js:124:26)
    at ChildProcess.<anonymous> (/home/schalk/onemapnginx/node_modules/pdfinfo/lib/pdfinfo.js:79:16)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
1Map commented 4 years ago

Ok, what I figured out is that your code are different than the code installed through "npm install" for 0.0.3

1Map commented 4 years ago

Ok, updated my pdfinfo.js with your latest, but still getting:

TypeError: lines[i].split is not a function
    at parse (/home/schalk/onemapnginx/node_modules/pdfinfo/lib/pdfinfo.js:160:28)
    at ChildProcess.onClose (/home/schalk/onemapnginx/node_modules/pdfinfo/lib/pdfinfo.js:94:20)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:606:12)