> For the complete documentation index, see [llms.txt](https://docs.cherry-ai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherry-ai.com/docs/zhong-wen-fan-ti/pre-basic/settings/doc-process.md).

# 文件處理

簡單講：**呢個係 Cherry Studio「將 PDF／圖片／掃描件認字」嘅中央設定。**

舉幾個例子，下面呢啲事都依賴佢：

* 你拖入一份掃描版合同 PDF 入對話框，想俾 AI 睇明內容
* 你把一堆圖片格式嘅發票放入[知識庫](/docs/zhong-wen-fan-ti/knowledge-base/knowledge-base.md)，希望之後可以搵
* 你嘅 [Agent](/docs/zhong-wen-fan-ti/cherry-studio/preview/agent.md) 要打開本地資料夾入面某張截圖分析

呢啲場景背後都要先將「圖像入面嘅文字」變成「可以俾 AI 讀嘅文字」，呢一步技術上叫 **OCR**（Optical Character Recognition，光學字符辨識）。

Cherry Studio 將 OCR 設定統一放喺**一個設定頁**：你喺呢度設定一次，所有用到 OCR 嘅地方都會用同一套設定。

### 配置入口

打開 `設定 → 文件處理`：

<figure><img src="/files/9070a2ac0e0b3c7505405dd5394927de4b95fa61" alt=""><figcaption><p>文件處理設定面板</p></figcaption></figure>

面板分兩部分，分別管「圖片識字」同「PDF 解析」。

#### 1. OCR 服務 — 幫圖片認字

適用對象：圖片（截圖、掃描件）、需要先識別成文字先可以俾 AI 讀嘅內容。

* **macOS**：揀「系統 OCR」就得，**唔使任何設定**，借用系統自帶嘅識圖能力，離線、免費 ✅
* **Windows**：揀「系統 OCR」即開即用；如果要識別非英文／中文以外嘅語種，需要喺 Windows 系統下載相應語言包
* **Linux / 進階**：可選 Tesseract、Paddle OCR、OpenVINO 等

<details>

<summary>OCR 引擎比較</summary>

| 引擎             | 適合邊個                                  |
| -------------- | ------------------------------------- |
| **系統 OCR**     | 最簡單，免設定，效果通常已經夠                       |
| **Tesseract**  | 經典開源 OCR，已內置喺 Cherry Studio 入面，支援自訂語言 |
| **Paddle OCR** | 中文辨識效果更好（百度開源），需要「星河社區存取權杖 + API URL」 |
| **OpenVINO**   | Intel 顯示卡可加速                          |

唔確定時用預設系統 OCR，辨識效果唔理想再轉。

</details>

#### 2. 文件處理服務商 — 幫 PDF／複雜文件做結構化解析

適用對象：帶表格／多欄／掃描頁嘅 PDF、長文檔。普通純文字 PDF 直接讀就得，唔使經過呢度。

| 服務商            | 簡單說明                                                                       |
| -------------- | -------------------------------------------------------------------------- |
| **MinerU**（預設） | 免費雲服務，專攻複雜版面 PDF（學術論文、合同等），要去 [mineru.net](https://mineru.net) 註冊攞 API Key |
| **Paddle OCR** | 離線方案，需要配置星河社區存取權杖                                                          |
| **第三方供應商**     | 調用你已設定嘅某間 AI 服務商嘅視覺模型嚟識別（效果更智能但要收費）                                        |

### 設定 MinerU（預設方案）

1. 喺 **API Key** 喺欄位填入 MinerU 申請到嘅 key
2. **API Host** 保持預設 `https://mineru.net`
3. 切換到知識庫或者 Agent 時唔使額外設定，會自動用呢度嘅設定

### 同知識庫嘅關係

* 文件處理只負責「非文字 → 文字」呢一步
* 轉換後嘅文字繼續經 [嵌入模型](/docs/zhong-wen-fan-ti/knowledge-base/emb-models-info.md) 向量化、入庫
* 詳細嘅「喺知識庫中啟用」流程見 [知識庫文件預處理](/docs/zhong-wen-fan-ti/knowledge-base/document-preprocessing.md)

### 幾時唔需要設定

* 你只用知識庫匯入純文字（`.md` / `.txt` / `.docx` 入面嘅純文字段落）→ 完全唔經文件處理
* 你只用對話功能、唔傳文件 → 同上

### 提示同技巧

* MinerU 對帶表格／多欄排版嘅 PDF 效果明顯優於 Tesseract，遇到學術論文等首選
* 離線場景請用 Paddle OCR 或 Tesseract（無網都行）
* 切換處理器後，之前已向量化嘅資料 **唔會自動重做** —— 要手動重新匯入

***

### 💡 獲取幫助同提交反饋

如果您喺配置或使用過程中遇到任何疑問、Bug 或有功能改進建議，請參考 [反饋同建議](/docs/zhong-wen-fan-ti/question-contact/suggestions.md) 入面提供嘅官方渠道。


---

# 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://docs.cherry-ai.com/docs/zhong-wen-fan-ti/pre-basic/settings/doc-process.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.
