- Newest
- Most votes
- Most comments
Hi Patrick,
Textract has two modes for processing documents: synchronous and asynchronous. The difference is pretty well summed up here:
Amazon Textract provides synchronous operations for processing small, single-page, documents and with near real-time responses. For more information, see Processing Documents with Synchronous Operations. Amazon Textract also provides asynchronous operations that you can use to process larger, multipage documents. Asynchronous responses aren't in real time. For more information, see Processing Documents with Asynchronous Operations.
The $client->analyzeExpense($options) call you are making uses one of the synchronous API endpoints, and so it doesn't support multi-page documents.
Instead, you'll need to use the startExpenseAnalysis method which starts an asynchronous job. Instead of returning the result, this method returns a JobId which you can use with the getExpenseAnalysis method to get the results once they are ready.
Thanks,
Marrick
Relevant content
- asked 10 months ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
