0.0.1 • Published 2 years ago

table-extractor v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

table-extractor

Helps you extract data from tables PDF files like bank statements, invoices, etc.

Install

npm install table-extractor

Usage

import tableExtractor from "table-extractor";
// p → page
// a → area (top,left,bottom,right i.e. y1,x1,y2,x2)
tableExtractor("/tmp/bank-statement.pdf", [
  { p: 1, a: "427.284375,7.999774999999979,679.415625,586.637275" },
  { p: 2, a: "63.590625,7.999774999999979,607.271875,588.124775" },
]);

//=> 'csvString'

API

tableExtractor(filePaths, options)

filePath

Type: string

Path of the PDF file

options

Type: object | array

See the tabula-java options.