> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Review

> Finds and fixes the problems in your Word, PowerPoint, Excel or PDF file.

Upload your file and ask us to review it. No AI: we return **the same file, fixed** (in its format, with its PDF) and a
report with everything we found and everything we did.

It works for Word (`.docx`), PowerPoint (`.pptx`), Excel (`.xlsx`) and PDF. It also takes the old `.doc`, `.ppt` and
`.xls` formats: we convert them and the result comes back in the modern format (`.docx`, `.pptx`, `.xlsx`).

<Steps>
  <Step title="Upload the file">
    ```bash theme={null}
    curl https://api.eu.doconda.com/v1/files \
      -H "Authorization: Bearer $DOCONDA_API_KEY" \
      -F "file=@contrato.docx"
    # → { "id": "file_01JAB3…", "filename": "contrato.docx", … }
    ```
  </Step>

  <Step title="Ask for the review">
    ```json theme={null}
    POST /v1/documents
    { "operation": "review", "file": "file_01JAB3…" }
    ```

    Like any document, in direct, `stream` or `background` mode. If Doconda made the file, pass its id instead of
    uploading it: `"file": "doc_01JAB3…"`.
  </Step>

  <Step title="Read the result">
    `status` tells you how it turned out and `GET /documents/{id}/report` gives you the details.
  </Step>
</Steps>

| `status` | What it means |
| - | - |
| `ready` | No problems (or all fixed). |
| `ready_with_warnings` | Minor warnings remain. |
| `needs_review` | Something remains that we can't fix without changing your content: check it in the report. |

<Info>
  **We never change your text or your values**: a mistyped amount is flagged, not corrected. We only apply safe fixes;
  the rest is reported. Each fix is applied only if the file improves; otherwise it's discarded and noted in the
  report (`ledger`).
</Info>

## Where each problem is

Each issue in the report says where it is, in `location`:

* `pages`: the pages (Word, PDF) or slides (PowerPoint), starting at 1.
* `sheet` and `cells`: in Excel, the sheet and the cells or ranges (`B3`, `A2:B2`).

```json theme={null}
{
  "code": "xlsx.formula_error",
  "severity": "error",
  "message": "Sheet \"Sales\" has cells showing the error #REF!: B7.",
  "fixable": false,
  "location": { "sheet": "Sales", "cells": ["B7"] }
}
```

## Security

Before opening your file we check it for security:

* **We reject** files with macros, files that aren't really the format they claim, password-protected PDFs, abnormal
  internal structures or XML declarations (common attack vectors).
* **We remove** anything that would load or run by itself: linked images and links to external resources, attached
  templates, embedded objects and files, automatic actions on open and links that launch a program. Normal hyperlinks
  are kept.

Anything we remove appears in the report, in `sanitized.removed`.

## What we check

In every format: `money.words_mismatch` (an amount in words that doesn't match the figure, such as "€1,200" versus
"one thousand three hundred euros") and `font.missing` (a font we don't have). Both are reported, not fixed.

### Word (`.docx`, `.doc`)

| Code | What it detects | Automatic fix |
| - | - | - |
| `table.overflow_width` | A table wider than the page | Fit to width |
| `heading.orphaned` | A heading alone at the bottom of a page | Keep it with the next paragraph |
| `signature.split_across_pages` | A signature split across pages | Keep it together |
| `numbering.discontinuous` | Gaps in clause or section numbering | Renumber |
| `style.not_applied` | The requested style doesn't appear in the result | Reapply the style |
| `crossref.broken` | "see clause 5" that doesn't exist | — (reported; and we don't renumber, so it doesn't point to another one) |
| `content.empty_section` | A heading with nothing under it | — |

### PowerPoint (`.pptx`, `.ppt`)

| Code | What it detects | Automatic fix |
| - | - | - |
| `pptx.text_overflow` | Text overflowing its box | Shrink the text to fit |
| `pptx.shape_off_slide` | A shape partly off the slide | Bring it back inside |
| `pptx.empty_placeholder` | An empty placeholder | Remove it |
| `pptx.shape_outside_slide` | A shape entirely outside the slide | — |
| `pptx.text_too_small` | Text below 12 pt | — |
| `pptx.too_many_fonts` | Too many different fonts | — |
| `pptx.empty_slide` | An empty slide | — |
| `pptx.no_title` | A slide without a title | — |
| `pptx.duplicate_title` | Repeated titles | — |
| `pptx.image_low_resolution` | A picture below 96 dpi | — |
| `pptx.image_linked` | A picture linked to an external file | — |
| `pptx.no_slide_numbers` | A deck of 10 or more slides without numbers | — |

### Excel (`.xlsx`, `.xls`)

| Code | What it detects | Automatic fix |
| - | - | - |
| `xlsx.number_as_text` | Numbers stored as text | Convert them, when unambiguous |
| `xlsx.print_too_wide` | A sheet too wide to print | Fit to page width |
| `xlsx.formula_error` | Formula errors (`#REF!`, `#DIV/0!`…) | — |
| `xlsx.broken_reference` | Broken references | — |
| `xlsx.external_link` | Formulas that depend on other files | — |
| `xlsx.inconsistent_formula` | A number typed by hand between matching formulas | — |
| `xlsx.date_as_text` | Dates stored as text | — |
| `xlsx.hidden_data` | Hidden sheets, rows or columns with data | — |
| `xlsx.merged_in_table` | Merged cells inside a table | — |
| `xlsx.empty_sheet` | An empty sheet | — |
| `xlsx.no_header` | A table without a header | — |

### PDF

| Code | What it detects | Automatic fix |
| - | - | - |
| `pdf.no_text_layer` | Scanned pages without text | Add an invisible text layer (OCR) so it can be searched and copied |
| `pdf.title_missing` | No title | Set it from the first page |
| `pdf.language_missing` | No language | Set it, detected from the text |
| `pdf.fonts_not_embedded` | Fonts not embedded | — |
| `pdf.blank_page` | Blank pages | — |
| `pdf.page_size_mixed` | Pages of different sizes | — |
| `pdf.text_rotated` | Text sideways or upside down | — |
| `pdf.image_low_resolution` | A picture below 150 dpi | — |
| `pdf.untagged` | An untagged PDF (accessibility) | — |
| `pdf.link_broken` | Broken internal links | — |
| `pdf.form_empty` | Empty form fields | — |
| `pdf.annotations` | Comments or review marks left in the document | — |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.