Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashiknesin/table-extractor
Helps you extract data from tables PDF files like bank statements, invoices, etc.
https://github.com/ashiknesin/table-extractor
Last synced: 5 days ago
JSON representation
Helps you extract data from tables PDF files like bank statements, invoices, etc.
- Host: GitHub
- URL: https://github.com/ashiknesin/table-extractor
- Owner: AshikNesin
- License: mit
- Created: 2022-04-24T10:43:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-24T11:19:57.000Z (over 2 years ago)
- Last Synced: 2024-10-13T08:57:40.390Z (about 1 month ago)
- Language: JavaScript
- Size: 11.2 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# table-extractor
> Helps you extract data from tables PDF files like bank statements, invoices, etc.
## Dependency
It's a node wrapper for tabula-java. So make sure JVM is installed in your machine.
## Install
```sh
npm install table-extractor
```## Usage
```js
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](https://github.com/tabulapdf/tabula-java#usage-examples) options.