Node.js Tutorial to Extract Tables From PDF Document Using pdf2table Module

Node.js Tutorial to Extract Tables From PDF Document Using pdf2table Module

var pdf2table = require('pdf2table');
var fs = require('fs');
 
fs.readFile('./test.pdf', function (err, buffer) {
    if (err) return console.log(err);
 
    pdf2table.parse(buffer, function (err, rows, rowsdebug) {
        if(err) return console.log(err);
 
        console.log(rows);
    });
});

Leave a Comment