Skip to content

GetDocumentTextDetection

Source: src/AWS/Textract/GetDocumentTextDetection.ts

Runtime binding for textract:GetDocumentTextDetection — read the status and results of an asynchronous OCR job started with StartDocumentTextDetection.

// init
const getDocumentTextDetection =
yield* AWS.Textract.GetDocumentTextDetection();
// runtime
const result = yield* getDocumentTextDetection({ JobId: jobId });
const lines = (result.Blocks ?? [])
.filter((b) => b.BlockType === "LINE")
.map((b) => b.Text);