Extract tables from PDF
This package is based on ronnywang's pdf-table-extractor with just a few fixes.
$ npm install --save @florpor/pdf-table-extractor
const pdfTableExtractor = require('@florpor/pdf-table-extractor');
pdfTableExtractor('my_file.pdf').then(res => {
console.log(JSON.stringify(res));
});
filePath
<[string]> the path to a pdf fileoptions
<[Object]>maxEdgesPerPage
<?[number]> maximum number of edges to process per page. if defined and number of identified edges surpasses the setting tables will not be processes for the current page.progressFunc
<?[function(Object)]> callback to call after each page is processes with the current result object.
- returns: <[Promise]<[Object]>>
To use the simple CLI clone this repo and run:
$ npm install
$ node parse-cmd.js samples/pta_10229_131308_94274.pdf
BSD License