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);
asked 2 months ago112 views
1 Answer
1
Accepted Answer

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
answered 2 months ago
profile picture
EXPERT
reviewed 2 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