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);
gefragt vor 3 Monaten124 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen