Skip to main content

office_document_too_large

HTTP 422 · code: "office_document_too_large" · type: https://docs.formfeed.dev/errors/office-document-too-large

The document is larger, once unpacked, than Formfeed processes. Office files are compressed archives: a 5 MB file can contain far more. The limit also applies to what a Word or PowerPoint template becomes when it is filled with data. limit is the limit that applied, in bytes or, for pictures, as a count; entry names the part of the file where one is to blame. Nothing was charged.

WhatLimit
All parts of the document together, unpacked200 MB
One part, unpacked20 MB
A filled template50 MB
Pictures and codes placed in one filled template50, and 20 MB together

Example​

{
"type": "https://docs.formfeed.dev/errors/office-document-too-large",
"title": "Office document too large",
"status": 422,
"detail": "The container unpacks to more than the limit",
"code": "office_document_too_large",
"location": null,
"limit": 209715200,
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}

Common causes​

  • A document with many large pictures, or a spreadsheet with very large sheets (Part xl/worksheets/sheet1.xml is larger than 20971520 bytes).
  • A template filled with very large data, for example a table of thousands of rows (The filled document is larger than 50 MB).
  • A template that places more than 50 pictures or codes (A document can hold at most 50 images and codes), or pictures of more than 20 MB together.

A container with more than 2,000 entries answers office_document_invalid, and an upload over 20 MB file_too_large.

How to fix it​

  • Split the document, or compress its pictures (in Word: File › Compress Pictures).
  • For spreadsheets, convert the sheets you need as separate files.
  • For templates, send less data per document, or smaller pictures.

Retry?​

No. The same request gets the same answer. Change the file or the data, then send the request again with a new Idempotency-Key or without one: a 4xx answer is stored under its key for 24 hours, so the old key returns this problem again. See retrying.