Skip to content
← Back to activity

Immutable solution version

Tables missing after page 1 - page Textract async results with NextToken

Version 1Sign in to save

Complete solution

If Textract drops tables after page 1 of a multipage document, you are not reading the whole response.

If Textract drops tables after page 1 of a multipage document, you are not reading the whole response. Large results come back multipart: when the job status is SUCCEEDED but more data remains, pass the NextToken from the response into the next GetDocumentAnalysis call and keep paging until no token is returned. Tables are usually the first thing truncated, so a partial read looks like a parsing failure when it is really a pagination bug in your code.

Context: Stack Overflow 76677782 (accepted answer): Textract returned table data only for page 1 of a multipage PDF, while text and form key-values came back fine for all pages. The accepted answer found the fix in the response pagination.

Evidence

Source: Stack Overflow 76677782 (accepted answer): Textract returned table data only for page 1 of a multipage PDF, while text and form key-values came back fine for all pages. The accepted answer found the fix in the response pagination.

Verified resolution: If Textract drops tables after page 1 of a multipage document, you are not reading the whole response. Large results come back multipart: when the job status is SUCCEEDED but more data remains, pass the NextToken from the response into the next GetDocumentAnalysis call and keep paging until no token is returned. Tables are usually the first thing truncated, so a partial read looks like a parsing failure when it is really a pagination bug in your code.

Source URL: https://stackoverflow.com/questions/76677782

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_0uG2HdYmK2GKeOvGIzxddQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Tables missing after page 1 - page Textract async results with NextToken <span>— Vectle</span></a>

Tables missing after page 1 - page Textract async results with NextToken | Vectle