> For the complete documentation index, see [llms.txt](https://help.brieftech.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.brieftech.ai/reference/document-processing-and-errors.md).

# Document processing and errors

## Processing stages

After upload, each document passes through the stages below before it is ready to review.

| Stage     | What happens                                                                                                                                                                                                                                             |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Detect    | The file type is detected and validated.                                                                                                                                                                                                                 |
| Convert   | Every document passes through this stage. Non-PDF files are converted to PDF; existing PDFs are cleaned up. It is also where the document's page count — the number the OCR page limits below are measured against — and its preview image are produced. |
| OCR       | Scanned or image-only PDFs have their text recognised.                                                                                                                                                                                                   |
| Parse     | The document text is split into pages and sections.                                                                                                                                                                                                      |
| Process   | The document text is embedded and added to the search index so it can be found.                                                                                                                                                                          |
| Linearise | The reviewable PDF is optimised for fast web viewing (linearised) so it opens quickly in the preview.                                                                                                                                                    |
| Finalise  | The final step: the document becomes ready to review. Any AI agents set up for the matter are then triggered to run in the background (for example, generating a summary); their results fill in on the already-ready document once extraction finishes. |

While a document is still being processed, the **Status** column shows a progress dial that fills as it moves through the stages above; hover the dial to see which stage it has reached. A document that completes all stages is ready to review and is shown with a blue tick. A document that cannot be processed shows an error with a reason.

## OCR page limits

OCR reads text from scanned or image-only pages so the document becomes searchable. Whether it runs, and how much of the document it covers, depends on two things: how much text the PDF already contains, and how long it is. The text test looks at the whole document, not page by page.

Some file types never go to OCR at all — their text is taken from the converted PDF instead of being recognised. Which formats these are, and what each supports, is set out in [Supported file formats](/reference/supported-file-formats.md).

In general:

* Pages that already contain readable text are generally left as they are, rather than being recognised again.
* A very long document may have OCR run over only its opening pages, or skipped altogether, so a large file doesn't hold up processing.

If BriefTech cannot determine a PDF's page count, the length-based limit does not apply and the document is treated as a short one.

These limits apply whenever BriefTech processes a document, including when you reindex or retry it. Only [Force OCR](#force-ocr) is exempt — it is not bound by the length limits, and it is not skipped merely because the document already contains text.

A document whose OCR is skipped or partial still finishes processing and can be added to the Document Index; only AI features that rely on extracted text are affected.

## Force OCR

When OCR is skipped or only partial — for example a long scanned PDF, or one BriefTech judged to already contain text — you can re-run OCR over **every** page on demand. Select the documents in the <img src="/files/TkXmUkwMiGfDigifVWS6" alt="Files tab" data-size="line"> tab (or right-click a row) and choose <img src="/files/e5CmHtOSwwYbSxDRwiAA" alt="Force OCR" data-size="line">. It is available for any document that has finished processing (is *ready*) and has not already been fully OCR'd. If your selection includes even one document that isn't eligible, the choice does not appear at all — it isn't shown greyed out — so narrow the selection to eligible documents to bring it back.

Force OCR re-recognises text on all pages, overriding the page limits above, and replaces the document's searchable text. Because it commits the document to your indexed set, it draws the standard index charge of 1 credit per 50 pages — the same charge an export makes, brought forward, not a separate OCR fee. Whoever runs it, the credits are taken from the **matter owner's** balance, not the acting user's.

* **A document already charged** for a previous export or Force OCR is not charged again, and no confirmation appears.
* **Otherwise** BriefTech shows a **Confirm Force-OCR** dialog with the exact amount, so you can cancel before anything is spent.

See [Credit costs and pricing](/reference/credit-costs-and-pricing.md).

Force OCR runs as a background task. A [Job Logs](/reference/job-logs.md) window opens automatically to show its progress; you can close it and carry on working, and follow the job later from [Background Jobs](/reference/background-jobs.md). When it succeeds, the document re-enters the processing pipeline from the Parse stage — its text is split into pages and sections again, and re-added to the search index — before it returns to ready.

## OCR status

The <img src="/files/TkXmUkwMiGfDigifVWS6" alt="Files tab" data-size="line"> tab includes an **OCR** column showing what happened to each document's text recognition. Each value is a small coloured icon; hover it to see the status name and a short explanation. It lets you tell at a glance why a document is, or isn't, fully searchable.

| Status              | What it means                                                                                                                                                                                            |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Not started         | OCR has not run yet — the document is still being processed.                                                                                                                                             |
| Skipped             | The document's file type does not go through OCR; its text comes from the converted PDF instead.                                                                                                         |
| Skipped Text        | The document already contained text, so it was not fully re-read. What happened to any remaining pages follows the [OCR page limits](#ocr-page-limits) above.                                            |
| Missing PDF         | No PDF version of the document was available to read, so no text was recognised.                                                                                                                         |
| Page limit exceeded | The document was longer than the OCR limit. Depending on its length, either its first few pages were read or none were — both cases share this label. See the [OCR page limits](#ocr-page-limits) above. |
| Succeeded           | OCR read the document's pages successfully.                                                                                                                                                              |
| Running             | OCR is in progress — this appears while a [Force OCR](#force-ocr) job is running.                                                                                                                        |
| Failed              | OCR could not complete, and the document shows a processing error.                                                                                                                                       |

## Error reasons

| Error              | Cause                                                                                           |
| ------------------ | ----------------------------------------------------------------------------------------------- |
| Password Protected | The file is locked with a password and cannot be read.                                          |
| Unsupported Type   | The detected file type is not in the [supported formats](/reference/supported-file-formats.md). |
| Empty File         | The file contains no content (zero bytes).                                                      |
| File Too Large     | The file exceeds the [size limit](/reference/file-size-and-storage-limits.md) for its type.     |

A document that stops for one of the reasons above shows it in the **Exception** column, in the Exceptions view of the <img src="/files/TkXmUkwMiGfDigifVWS6" alt="Files tab" data-size="line"> tab. Not every failure has a listed reason, though. If a document fails partway through processing — for example a conversion or OCR step that could not complete — it shows the red error icon with a free-form message instead. That message usually begins with the stage that failed (for example `converting:` or `ocring:`), which is the clue to where the document stopped; hover the icon to read it.

> For how to fix each error, see [Reprocess a failed document](/how-to-guides/process/reprocess-failed-document.md).

## Related

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>The document lifecycle: from upload to ready</strong></td><td>What happens to a file between upload and the moment it can be used.</td><td><a href="/pages/u8eIgAY8I81LcXEFoaCo">/pages/u8eIgAY8I81LcXEFoaCo</a></td></tr><tr><td><strong>Reprocess a failed document</strong></td><td>Re-run a document through the processing pipeline after it failed.</td><td><a href="/pages/kntArxiUSk94F5Le5P36">/pages/kntArxiUSk94F5Le5P36</a></td></tr><tr><td><strong>Background Jobs</strong></td><td>Status indicators, columns, and row actions in the Background Jobs dialog.</td><td><a href="/pages/REaGxjKXuLlDxbm28MDE">/pages/REaGxjKXuLlDxbm28MDE</a></td></tr><tr><td><strong>Unlock a password-protected file</strong></td><td>Decrypt a password-protected file so BriefTech can process it.</td><td><a href="/pages/zpTxCV4vgDm8RkMmFgJt">/pages/zpTxCV4vgDm8RkMmFgJt</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.brieftech.ai/reference/document-processing-and-errors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
