ocr-pdf-legacy
Extract text from scanned PDFs using Baidu OCR API. Specify pages, language, and processing options to convert images to searchable text.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"api_key": "<api_key>",
"secret_key": "<secret_key>"
},
"name": "ocr-pdf-legacy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | PDF 文件路径 | |
| api_key | Yes | 百度 OCR API Key | |
| secret_key | Yes | 百度 OCR Secret Key | |
| pages | No | 页码范围(如 '1-3', '1,3,5', 'all'),默认 '1'(仅第一页) | |
| language_type | No | 语言类型,默认 CHN_ENG | |
| detect_direction | No | 是否检测图像方向,默认 false | |
| detect_language | No | 是否检测语言,默认 false | |
| paragraph | No | 是否输出段落信息,默认 false |