Skip to main content
Roberty Studio
RPAAWS

Textract

Textract

Recognizes text in images and PDF documents using the AWS Textract service. It allows you to extract words, lines, forms, tables and answers to questions from image or PDF files.


Options​

File path​

Enter the full path of the file (image or PDF) to be analyzed by Textract.

Pages to work on​

Enter which pages of the PDF must be processed, separating pages with commas and ranges with a hyphen, for example 1-3, 5. Leave it empty to process all pages.

Analyze forms​

Enable this option to extract key-value pairs (forms) from the document. Default: disabled.

Analyze tables​

Enable this option to extract structured tables from the document. Default: disabled.

Analyze questions​

Enable this option to send questions to Textract and get answers extracted from the document. Default: disabled.

Questions to be answered​

Enter the questions Textract must answer based on the document content. Available only when Analyze questions is enabled.

Region​

Enter the AWS region where the Textract service is configured.

Access Key​

Enter the access key of the AWS account.

Secret Access Key​

Enter the secret access key of the AWS account.

Bucket name​

Enter the name of the S3 bucket used for the processing. The bucket must be in the same region as the Textract service.

Timeout​

Enter the maximum time (in seconds) to wait for the analysis to complete. Default: 120.

Returns​

Javascript code​

js
actions["action-id"].content // content of the document analyzed by the OCR (Text)
actions["action-id"].words // words found by the OCR (List)
actions["action-id"].lines // lines of words found by the OCR (List)
actions["action-id"].forms // forms found by the OCR (List)
actions["action-id"].tables // tables found by the OCR (List)
actions["action-id"].queries // answers found by the OCR for the questions (List)

Field selection​

  • content — content of the document analyzed by the OCR, with the lines found separated by line breaks (Text)
  • words — words found by the OCR; each item has content (the word) and page (List)
  • lines — lines of words found by the OCR; each item has content (the line text) and page (List)
  • forms — forms found by the OCR; each item has key, value and page (List)
  • tables — tables found by the OCR; each item has headersContent, headersSize, valuesContent, valuesSize and page (List)
  • queries — answers found by the OCR for the questions; each item has content (the answer), alias and page (List)

Rules and Conditions​

  • The File path, Region, Access Key, Secret Access Key, Bucket name and Timeout fields are required.
  • The S3 bucket must be in the same region as the Textract service.
  • For the question analysis, the questions must be provided beforehand.
  • forms, tables and queries are only filled when the corresponding analysis is enabled; otherwise, they come back empty.
  • If the analysis does not finish within the Timeout, the robot stops the run with an error.