npm.io
0.0.4 • Published 2 years ago

aws-textract-node

Licence
ISC
Version
0.0.4
Deps
2
Size
58 kB
Vulns
0
Weekly
0

AWS TEXTRACT

Simple Textract PDF and Image File

Install

$ npm install aws-textract-node

Usage

let config = {
    aws_region: xxx,
    aws_access_key_id: xxx,
    aws_secret_access_key: xxx,
};

const data = await awsTextract.TextractProcess({
    ...config,
    pathFile: xxx,
});

Example

let config = {
    aws_region: xxx,
    aws_access_key_id: xxx,
    aws_secret_access_key: xxx,
};

const data = await awsTextract.TextractProcess({
    ...config,
    pathFile: "./test/example.jpeg",
});

const line = awsTextract.getValue(data, "Total");
// { key: 'Total', value: '$115.00' }

Helper

No Function Description Params
1 getValue() Get Word (Value) From Another Word (Key) source : data from textract [array],
key : keyword [string],
next : if between the key and value there is word, default next=1 [integer]
Roadmap
  • Using AnalyzeDocumentCommand.
  • Function Helper (getValue)
  • ..
Contributing
  1. Eko Setiyo Budi Purnomo (eko.setiyobp@gmail.com)