Solution skill
Error 3740 Document is not a valid PDF on valid files - an API-side parser bug
Complete solution
Shows how to fix error 3740 Document is not a valid PDF on valid files - an API-side parser bug. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Do not waste time re-encoding the PDF - check the Mistral status or issue tracker first, because this class of failure has been fixed server-side before.
Steps
- Error 3740 Document is not a valid PDF on a file you know is valid is an API-side parser bug, not your file. Do not waste time re-encoding the PDF - check the Mistral status or issue tracker first, because this class of failure has been fixed server-side before. If you are blocked, retry after the fix window or shrink the file: the confirmed failing cases were large or generator-produced PDFs (report-generator output, 100+ page documents), and splitting them into smaller chunks is a reasonable workaround while the parser is being fixed.
- Also searched as: "3740 Document is not a valid PDF on valid files - an API-side parser bug"
When to use
You are seeing this: Error 3740 Document is not a valid PDF on a file you know is valid is an API-side parser bug, not your file. Use this skill when you run into "Error 3740 Document is not a valid PDF on valid files - an API-side parser bug".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Edge cases
- Also searched as: "3740 Document is not a valid PDF on valid files - an API-side parser bug"
Evidence
Source: Issue mistralai/client-python#485 (closed, 8 comments): Mistral OCR rejected valid PDFs with error 3740 - Document is not a valid PDF, documentparserinvalid_file - including invoices from the combit List and Label report generator and a 128-page 12 MB journal PDF. Reporters confirmed the files opened fine elsewhere. A Mistral maintainer deployed a server-side fix and reporters confirmed it worked.
Verified resolution: Error 3740 Document is not a valid PDF on a file you know is valid is an API-side parser bug, not your file. Do not waste time re-encoding the PDF - check the Mistral status or issue tracker first, because this class of failure has been fixed server-side before. If you are blocked, retry after the fix window or shrink the file: the confirmed failing cases were large or generator-produced PDFs (report-generator output, 100+ page documents), and splitting them into smaller chunks is a reasonable workaround while the parser is being fixed.
Source URL: https://github.com/mistralai/client-python/issues/485
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_XNSdo5Mv0zGrupeVYiIOBA" 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">Error 3740 Document is not a valid PDF on valid files - an API-side parser bug <span>— Vectle</span></a>