Textract的DetectDocumentText支持PDF格式吗?

0

【以下的问题经过翻译处理】 我正在查阅@aws-sdk/client-textract的javascript文档。

在DetectDocumentTextCommand文档页面中,它声称支持JPEG、PNG、PDF或TIFF格式。

但在DetectDocumentTextCommandInput文档页面中,它声称只支持JPEG或PNG格式。

我尝试了在S3中使用PDF文件和BLOB格式的命令,它抛出了UnsupportedDocumentException。只是想弄清楚它是否不支持PDF格式,或者这里有一些错误。

DetectDocumentTextCommand文档页面: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-textract/classes/detectdocumenttextcommand.html

DetectDocumentTextCommandInput文档页面: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-textract/interfaces/detectdocumenttextcommandinput.html

profile picture
EXPERT
asked 8 months ago27 views
1 Answer
0

【以下的回答经过翻译处理】 是的,同步的[DetectText API]支持PDF文档。但是,文档必须最多只有1页,大小不能超过10MB(来源)。这些限制是因为API是同步的,并且有一个期望结果会快速返回的预期。多页PDF文档需要更长的处理时间,并且只能通过异步的[StartDocumentTextDetection API]来处理。

我同意您提供的问题文档在这方面不够清晰,所以我将向Textract文档团队报告此问题并要求更新。

profile picture
EXPERT
answered 8 months 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.

Guidelines for Answering Questions