PDF Tools
Définir la protection par mot de passe et les permissions pour les documents PDF
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/pdf-permissions-set' \
-F 'file=@/path/to/pdfFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/pdf-permissions-set' \
-F 'pdfFile=/public/samples/pdf/sample-document.pdf' \
-F 'userPassword=secret123' \
-F 'ownerPassword=' \
-F 'allowPrinting=true' \
-F 'allowModifying=false' \
-F 'allowCopying=false' \
-F 'allowAnnotating=true' \
-F 'allowFillingForms=true' \
-F 'allowExtraction=true' \
-F 'allowAssembly=false' \
-F 'allowHighQualityPrint=true'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/pdf-permissions-set| Nom | Type | Requis | Description |
|---|---|---|---|
| pdfFile | fileupload requis | Oui | — |
| userPassword | text | Oui | — |
| ownerPassword | text | Non | — |
| allowPrinting | checkbox | Non | — |
| allowModifying | checkbox | Non | — |
| allowCopying | checkbox | Non | — |
| allowAnnotating | checkbox | Non | — |
| allowFillingForms | checkbox | Non | — |
| allowExtraction | checkbox | Non | — |
| allowAssembly | checkbox | Non | — |
| allowHighQualityPrint | checkbox | Non | — |
Résultat fichier
{
"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)"
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-pdf-permissions-set": {
"name": "pdf-permissions-set",
"description": "Définir la protection par mot de passe et les permissions pour les documents PDF",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pdf-permissions-set",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pdf-permissions-set",
"arguments": {
"pdfFile": "/public/samples/pdf/sample-document.pdf",
"userPassword": "secret123",
"ownerPassword": "",
"allowPrinting": true,
"allowModifying": false,
"allowCopying": false,
"allowAnnotating": true,
"allowFillingForms": true,
"allowExtraction": true,
"allowAssembly": false,
"allowHighQualityPrint": true
}
}
}Des questions ou un problème ? Contactez [email protected]