PDF Tools
Add searchable/copyable OCR text layer to scanned PDF using Tesseract
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/pdf-ocr-text-layer' \
-F 'file=@/path/to/sourceFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/pdf-ocr-text-layer' \
-F 'sourceFile=/Users/quyue/www/elysia-tools/public/samples/pdf/pdf-2026-02-19-source-4pages.pdf' \
-F 'language=eng' \
-F 'dpi=300' \
-F 'oem=1' \
-F 'psm=3'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/pdf-ocr-text-layer| Name | Type | Required | Description |
|---|---|---|---|
| sourceFile | fileupload required | Yes | — |
| language | text | No | — |
| dpi | number | No | — |
| oem | number | No | — |
| psm | number | No | — |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-pdf-ocr-text-layer": {
"name": "pdf-ocr-text-layer",
"description": "Add searchable/copyable OCR text layer to scanned PDF using Tesseract",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-ocr-text-layer",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-ocr-text-layer",
"arguments": {
"sourceFile": "/Users/quyue/www/elysia-tools/public/samples/pdf/pdf-2026-02-19-source-4pages.pdf",
"language": "eng",
"dpi": 300,
"oem": 1,
"psm": 3
}
}
}File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]