Skip to content

Block "TextType" missing from response

0

We're looking to use the "TextType" information (HANDWRITING | PRINTED) mentioned as part of the Bock -> Page response - https://docs.aws.amazon.com/textract/latest/dg/API_Block.html

However, it's not available in any of the JSON responses. We've tested multiple regions (EU-WEST-1 AND US-EAST-1), and are using the latest version. It's not mentioned as a special feature, and presumably should be part of the standard response?

Can anyone assist?

asked 5 years ago328 views
2 Answers
0

What is the AWS SDK version that you are using? If you are shipping your own version it has to be above 2.792. Not sure what do you mean by JSON responses (plural, that is). Afaik TextType result is only available when the document (e.g. PDF) has been processed by Textract and the results were obtained, for example, via getDocumentTextDetection call.

answered 5 years ago
0

Thanks for the reply - it ended up solving the issue. The issue was due to the version of PHP SDK. I was using 3.158.3 but needed to update to 3.174.0. When calling the service I was using the "latest" keyword in the constructor assuming it would use the latest API version regardless of the SDK, but I see it is still limited by the SDK bundle itself to what it perceives as the "latest".

It is odd though that the Textract console on AWS is not using the latest version, as it does not contain the "TextType" attribute either. I would've assumed it was using the latest, but seems not. Would've helped in my initial investigations to show it wasn't a region problem or similar.

Edited by: bluebox-steven on Mar 16, 2021 5:09 AM

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.