Media
Convert AVIF images to PDF format with customizable page size, orientation, and quality settings
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/avif-to-pdf' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/avif-to-pdf' \
-F 'imageFile=/path/to/file.ext' \
-F 'pageSize=A4' \
-F 'orientation=portrait' \
-F 'quality=80' \
-F 'backgroundColor=white' \
-F 'margin=10' \
-F 'title=Enter document title...' \
-F 'author=Enter author name...' \
-F 'subject=Enter document subject...' \
-F 'keywords=Enter keywords...' \
-F 'fitMode=contain' \
-F 'centerImage=true' \
-F 'preserveAspectRatio=true'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/avif-to-pdf| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | — |
| pageSize | select | No | PDF document page size |
| orientation | select | No | Page orientation for the PDF |
| quality | select | No | Quality setting for embedded image |
| backgroundColor | select | No | Background color for the PDF page |
| margin | range | No | Page margin as percentage of page size |
| title | text | No | PDF document title metadata |
| author | text | No | PDF document author metadata |
| subject | text | No | PDF document subject metadata |
| keywords | text | No | PDF document keywords (comma-separated) |
| fitMode | select | No | How the image should fit within the page |
| centerImage | checkbox | No | Center the image on the page |
| preserveAspectRatio | checkbox | No | Maintain original image proportions |
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-avif-to-pdf": {
"name": "avif-to-pdf",
"description": "Convert AVIF images to PDF format with customizable page size, orientation, and quality settings",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=avif-to-pdf",
"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": "avif-to-pdf",
"arguments": {
"imageFile": "https://example.com/file.ext",
"pageSize": "A4",
"orientation": "portrait",
"quality": "80",
"backgroundColor": "white",
"margin": 10,
"title": "Enter document title...",
"author": "Enter author name...",
"subject": "Enter document subject...",
"keywords": "Enter keywords...",
"fitMode": "contain",
"centerImage": true,
"preserveAspectRatio": true
}
}
}Questions or issues? Contact [email protected]