Share via

Azure Document Intelligence returns InvalidContentLength for Apryse-generated PDF

Chithra P 0 Reputation points
2026-06-19T10:24:45.6+00:00

Hi,

When I send the PDF to Azure Document Intelligence, I receive the following error:

{ "error": { "code": "InvalidRequest", "message": "Invalid request.", "innererror": { "code": "InvalidContentLength", "message": "The input image is too large." } } }The pdf is 4335 kb.

Azure AI Document Intelligence 1.0.0 is using

Our application is in .net10

Azure Document Intelligence in Foundry Tools
0 comments No comments

Answer accepted by question author

AI answer

2026-06-19T10:24:59.28+00:00

The error InvalidContentLength with message The input image is too large. is caused by service input limits, not by the .NET version or the SDK itself.

From the Azure Document Intelligence input requirements:

  • Maximum file size for analyzing documents:
    • 500 MB for the paid (S0) tier
    • 4 MB for the free (F0) tier
  • For Office file types (DOCX, XLSX, PPTX) there is also a maximum string length limit of 8 million characters, but this does not apply to PDFs.

In this case the PDF is 4335 KB (~4.24 MB), which exceeds the 4 MB limit of the free (F0) tier. On F0, any document larger than 4 MB will be rejected with a size-related error, which surfaces as InvalidContentLength.

To resolve the issue, use one of these options:

  1. Confirm the pricing tier of the Document Intelligence resource
    • If using the free (F0) tier, either:
      • Reduce the PDF size below 4 MB (e.g., compress the PDF, reduce image resolution, or split into multiple smaller PDFs), or
      • Move to a paid (S0) tier resource, which supports files up to 500 MB.
  2. If already on S0
    • A 4.3 MB PDF is well below the 500 MB limit, so verify that the request is actually being sent to the S0 resource endpoint and key (not an older or free-tier resource).

The fact that the PDF is generated by Apryse is not relevant to this specific error; the size limit is what matters here.


References:

AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.