Skip to content

StartDocumentTextDetection

Source: src/AWS/Textract/StartDocumentTextDetection.ts

Runtime binding for textract:StartDocumentTextDetection — start an asynchronous OCR job for a (possibly multi-page) document stored in S3. Poll the returned JobId with GetDocumentTextDetection. The caller needs s3:GetObject on the input bucket.

// init
const startDocumentTextDetection =
yield* AWS.Textract.StartDocumentTextDetection();
// runtime
const { JobId } = yield* startDocumentTextDetection({
DocumentLocation: { S3Object: { Bucket: bucketName, Name: "doc.pdf" } },
});