Categories

PDF Header/Footer Snippets

Convert HTML to PDF with reusable logo, title, and date snippets

Render HTML to PDF and inject clean header/footer snippets. **Snippets supported:** - Logo (image upload) - Title text - Date (ISO, locale, or custom) - Optional page numbers in the footer **Layout:** - Left / center / right zones for each snippet - Works with custom margins for header/footer space

Click to upload file or drag and drop file here

Maximum file size: 5MB Supported formats: image/png, image/jpeg, image/svg+xml, image/webp

API Documentation

Request Endpoint

POST /en/api/tools/pdf-header-footer-snippets

Request Parameters

Parameter Name Type Required Description
htmlContent textarea Yes -
cssContent textarea No -
pageSize select No -
landscape checkbox No -
printBackground checkbox No -
marginTop number No -
marginBottom number No -
marginLeft number No -
marginRight number No -
headerEnabled checkbox No -
footerEnabled checkbox No -
logoFile file (Upload required) No -
logoWidth number No -
headerTitle text No -
footerTitle text No -
showDateInHeader checkbox No -
showDateInFooter checkbox No -
dateFormat select No -
customDateText text No -
showPageNumbers checkbox No -
waitUntil select No -
waitTime number No -

File type parameters need to be uploaded first via POST /upload/pdf-header-footer-snippets to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "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)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-pdf-header-footer-snippets": {
      "name": "pdf-header-footer-snippets",
      "description": "Convert HTML to PDF with reusable logo, title, and date snippets",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=pdf-header-footer-snippets",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]