Hi M. Kerr
Thanks for using the Q&A platform.
The error InvalidContentLength suggests the input image is too large based on https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/how-to-guides/resolve-errors?view=doc-intel-4.0.0
However, the error is commonly seen by users even when working with smaller files if you have special characters in filenames, or a corrupt PDF structure, or unsupported features embedded in the file.
Kindly validate your PDF using PyPDF2 or PyMuPDF to ensure it’s not corrupt, has pages, and isn't encrypted. Verify page image dimensions by extracting each page image via pdfplumber, pymupdf, or poppler, and check that none exceed 10,000 pixels in width/height.
Find a similar issue stackoverflow: https://stackoverflow.com/questions/79272102/azure-document-intelligence-formrecognizer-invalidcontent
If the response was helpful, please feel free to mark it as “Accepted Answer” and consider giving it an upvote. This helps others in the community as well.
Regards,
Obinna.