Document Formats
InfoConnect accepts the formats below. The upload boundary validates the file before a processing task is queued, and the parser preserves page or sheet provenance where the format provides it.
Supported file types
| Format | Extensions | How it is parsed |
|---|---|---|
.pdf | Native text is extracted page by page. Low-text pages can use the OCR fallback. | |
| Word | .docx | Native text is treated as one page. |
| PowerPoint | .pptx | One page per slide; native shape text, tables, and speaker notes are included. |
| Excel | .xlsx | One page per visible, non-empty worksheet; stored cell values are read and the worksheet name is included as a header. |
| Plain text | .txt, .text | Treated as one page. |
| Markdown | .md | Treated as one page. |
| Images | .png, .jpg, .jpeg, .tif, .tiff | Sent to RapidOCR; successful output is returned as one page of extracted text. |
The configured extension list comes from ALLOWED_EXTENSIONS (the default is shown in
.env.example). The .text and .jpeg/.tiff
aliases are accepted alongside their canonical text and image extensions. Hidden or empty
worksheets are not emitted as pages. OCR of images embedded inside a PowerPoint slide is
not part of the PPTX parser; use an image upload when the image itself must be read.
Legacy binary Office formats
.ppt and .xls are included in the allowed extension list, but are opt-in. Set
OFFICE_LEGACY_CONVERSION_ENABLED=true and make sure the configured
LIBREOFFICE_BINARY (default: soffice) is available on the worker. InfoConnect then
converts the file to .pptx or .xlsx bytes before using the corresponding native parser.
When the flag is disabled, the upload is rejected at accept time with HTTP 400 and
error_code: "legacy_office_disabled". When the flag is enabled but LibreOffice is
unavailable on the worker, the job fails with an ingestion error. Modern .pptx and
.xlsx files do not require conversion.
Upload validation
The default MAX_FILE_SIZE_MB is 200. The API counts uploaded bytes while staging the
file and rejects a file as soon as it exceeds that limit, before processing starts. The
validate_file_size() helper applies the same byte boundary (> 200 * 1024 * 1024 with
the default setting); an empty upload is rejected separately.
validate_file_type() normalizes the filename extension to lowercase and requires it to
appear in ALLOWED_EXTENSIONS. When the request supplies a Content-Type, that MIME type
must be allowed and compatible with the extension. For non-empty content, the validator also
checks the leading file signature against the extension. OOXML extensions share a ZIP
signature and legacy Office extensions share an OLE2 signature, so the parser performs the
final format-specific read after this family-level check.
Page handling
| File type | Page behavior | Page number in evidence |
|---|---|---|
| One emitted page per source page that has text. OCR can replace the text for a low-text page without changing its page number. A page with no text (and no OCR text) is skipped and never becomes a searchable chunk; remaining pages keep their source numbers. | Source page number | |
| DOCX | One page | 1 |
| PPTX / PPT | One page per slide | 1-indexed slide number |
| XLSX / XLS | One page per visible, non-empty worksheet | 1-indexed ordinal among emitted worksheets |
| TXT / TEXT / MD | One page | 1 |
| Images | One OCR result page | 1 |
For PDF documents, the page field in search evidence reflects the source page number.
Presentations report the slide number, and spreadsheets report the worksheet ordinal among
visible, non-empty worksheets. For all other formats, the page is 1.