PDF Tools
Permanently remove PDF text and hidden page objects by rebuilding an image-only PDF.
Call this tool from your code in three languages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/pdf-secure-redaction-sanitizer' \
-H 'Content-Type: application/json' \
-d '{"filename":"sourceFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/en/api/tools/pdf-secure-redaction-sanitizer' \
-F 'sourceFile=/public/processing/smoke-test-document.pdf' \
-F 'redactionRects=[{"page":1,"x":35,"y":210,"width":300,"height":36,"label":"REDACTED"}]' \
-F 'dpi=144' \
-F 'includeLabel=true' \
-F 'redactionColor=#000000'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-secure-redaction-sanitizer| Name | Type | Required | Description |
|---|---|---|---|
| sourceFile | fileupload required | Yes | — |
| redactionRects | textarea | Yes | — |
| dpi | number | No | Higher DPI improves visual fidelity but increases CPU and output size. |
| includeLabel | checkbox | No | — |
| redactionColor | color | No | — |
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)"
}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-secure-redaction-sanitizer": {
"name": "pdf-secure-redaction-sanitizer",
"description": "Permanently remove PDF text and hidden page objects by rebuilding an image-only PDF.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-secure-redaction-sanitizer",
"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-secure-redaction-sanitizer",
"arguments": {
"sourceFile": "/public/processing/smoke-test-document.pdf",
"redactionRects": "[{\"page\":1,\"x\":35,\"y\":210,\"width\":300,\"height\":36,\"label\":\"REDACTED\"}]",
"dpi": 144,
"includeLabel": true,
"redactionColor": "#000000"
}
}
}Questions or issues? Contact [email protected]