Send a .txt file, get back a PDF laid out with a monospace font. Conversion runs on LibreOffice headless.
See the TXT to PDF tool page, or the docs index for authentication, the shared request/webhook contract, and the generic error table.
POST /webhooks/trigger — same endpoint and fields as every tool, with tool="txt-to-pdf" set explicitly (it's not the default).
curl -X POST https://api.anyconvert.app/webhooks/trigger \ -H "x-api-key: your_api_key_here" \ -F "file=@notes.txt" \ -F "fileId=document-001" \ -F "referenceId=reference-001" \ -F "tool=txt-to-pdf"
An optional options multipart field carrying a JSON object, validated synchronously before a credit is charged — a bad value is rejected with 400, not charged and not queued.
| paper | string, optional | "A4" (default) or "Letter". |
| encoding | string, optional | Default "utf-8", or "auto" to detect the source encoding, or a specific name from the supported list. |
| fontFamily | string, optional | From the allow-list. Default Liberation Mono. |
| fontSize | number, optional | 6 to 24 pt, default 10. |
| password | string, optional | Reserved for a future release — v1 does not support opening a password-protected file. |
Billed per document — $1 (1 credit) per conversion, regardless of page count.
Delivered via the webhook as outcome=failure with a reason below — see the docs index for the full delivery shape.
| encrypted_file | The file is password protected — not supported in v1. |
| invalid_file | The file could not be read, or was not the format this tool expects. |
| render_failed | Something failed during conversion that wasn’t a problem with the input itself. |
| timeout | The job did not finish within its time budget. |
| internal_error | An unexpected error on our side. |