Textract Error With Multiples Pages

0

Hello,

My code breaks every time I attempt to analyze a PDF with more than one page. It displays the following error:

UnsupportedDocumentException: Request has unsupported document format   
    at de_UnsupportedDocumentExceptionRes

I've experimented with the same document, and it only works when it has one page.

My code:

            const input = {
                Document: {
                    S3Object: {
                        Bucket: "------",
                        Name: "-------",
                    },
                },
           FeatureTypes: ["QUERIES"],
                QueriesConfig: {
                    Queries: [
                        {
                            Text: "question?",
                            Alias: "question",
                        },
                  },

                AdaptersConfig: {
                    Adapters: [
                        {
                            AdapterId: "id",
                            Version: "8",
                        },
                    ],
                },
            };

          const command = new AnalyzeDocumentCommand(input);
            const response = await client.send(command);
已提問 3 個月前檢視次數 124 次
1 個回答
1
已接受的答案

Thanks for using Textract. Currently our Synchronous APIs only support single page document https://docs.aws.amazon.com/textract/latest/dg/sync.html. Please use StartDocumentAnalysis for analyzing text with multipage documents https://docs.aws.amazon.com/textract/latest/dg/async.html

AWS
Alan_L
已回答 2 個月前
profile picture
專家
已審閱 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南