Texify

Letters

Formal letter PDF API

Business letter template with sender block, recipient block, subject, body paragraphs, and signature. Good for notices, approvals, and generated correspondence. Send this LaTeX template and JSON data to Texify in one /render request.

Formal letter PDF preview

JSON schema

Fields this template expects.

FieldTypeRequiredDescription
senderobjectYesSender name and address.
recipientobjectYesRecipient name and address.
datestringYesLetter date.
subjectstringYesSubject line.
bodyarrayYesParagraphs rendered as letter body.

API examples

POST LaTeX and JSON. Receive PDF bytes.

curl
cat > formal-letter-payload.json <<'JSON'
{
  "entrypoint": "main.tex",
  "resources": {
    "main.tex": "\\documentclass[11pt]{article}\n\\usepackage[margin=0.85in]{geometry}\n\\pagestyle{empty}\n\\begin{document}\n\\noindent [[ .sender.name ]]\\\\\n[[ .sender.address ]]\\\\[0.25in]\n[[ .date ]]\\\\[0.25in]\n\\noindent [[ .recipient.name ]]\\\\\n[[ .recipient.address ]]\\\\[0.25in]\n\\noindent\\textbf{Re: [[ .subject ]]}\\\\[0.2in]\n[[ range .body ]]\\noindent [[ . ]]\\\\[0.14in]\n[[ end ]]\n[[ with .compensation ]]\\noindent\\textbf{Compensation:} [[ . ]]\\\\[0.18in][[ end ]]\n\\noindent Sincerely,\\\\[0.35in]\n[[ with .signer ]][[ . ]][[ else ]][[ .sender.name ]][[ end ]]\n\\end{document}"
  },
  "data": {
    "sender": {
      "name": "Northstar Labs",
      "address": "18 King Street, London"
    },
    "recipient": {
      "name": "Acme GmbH",
      "address": "Mehringdamm 40, Berlin"
    },
    "date": "2026-07-07",
    "subject": "API access approval",
    "body": [
      "Your API access request has been approved.",
      "We attached setup details and support contacts for your integration."
    ],
    "signer": "Elena Park",
    "compensation": null
  }
}
JSON

curl -sS -X POST https://api.texify.dev/render \
  -H "Content-Type: application/json" \
  --data @formal-letter-payload.json \
  --output formal-letter.pdf
Python
import json
import requests

payload = json.loads(r'''{
  "entrypoint": "main.tex",
  "resources": {
    "main.tex": "\\documentclass[11pt]{article}\n\\usepackage[margin=0.85in]{geometry}\n\\pagestyle{empty}\n\\begin{document}\n\\noindent [[ .sender.name ]]\\\\\n[[ .sender.address ]]\\\\[0.25in]\n[[ .date ]]\\\\[0.25in]\n\\noindent [[ .recipient.name ]]\\\\\n[[ .recipient.address ]]\\\\[0.25in]\n\\noindent\\textbf{Re: [[ .subject ]]}\\\\[0.2in]\n[[ range .body ]]\\noindent [[ . ]]\\\\[0.14in]\n[[ end ]]\n[[ with .compensation ]]\\noindent\\textbf{Compensation:} [[ . ]]\\\\[0.18in][[ end ]]\n\\noindent Sincerely,\\\\[0.35in]\n[[ with .signer ]][[ . ]][[ else ]][[ .sender.name ]][[ end ]]\n\\end{document}"
  },
  "data": {
    "sender": {
      "name": "Northstar Labs",
      "address": "18 King Street, London"
    },
    "recipient": {
      "name": "Acme GmbH",
      "address": "Mehringdamm 40, Berlin"
    },
    "date": "2026-07-07",
    "subject": "API access approval",
    "body": [
      "Your API access request has been approved.",
      "We attached setup details and support contacts for your integration."
    ],
    "signer": "Elena Park",
    "compensation": null
  }
}''')
response = requests.post(
    "https://api.texify.dev/render",
    json=payload,
    timeout=90,
)
response.raise_for_status()

with open("formal-letter.pdf", "wb") as pdf:
    pdf.write(response.content)
Node fetch
import { writeFile } from "node:fs/promises";

const payload = {
  "entrypoint": "main.tex",
  "resources": {
    "main.tex": "\\documentclass[11pt]{article}\n\\usepackage[margin=0.85in]{geometry}\n\\pagestyle{empty}\n\\begin{document}\n\\noindent [[ .sender.name ]]\\\\\n[[ .sender.address ]]\\\\[0.25in]\n[[ .date ]]\\\\[0.25in]\n\\noindent [[ .recipient.name ]]\\\\\n[[ .recipient.address ]]\\\\[0.25in]\n\\noindent\\textbf{Re: [[ .subject ]]}\\\\[0.2in]\n[[ range .body ]]\\noindent [[ . ]]\\\\[0.14in]\n[[ end ]]\n[[ with .compensation ]]\\noindent\\textbf{Compensation:} [[ . ]]\\\\[0.18in][[ end ]]\n\\noindent Sincerely,\\\\[0.35in]\n[[ with .signer ]][[ . ]][[ else ]][[ .sender.name ]][[ end ]]\n\\end{document}"
  },
  "data": {
    "sender": {
      "name": "Northstar Labs",
      "address": "18 King Street, London"
    },
    "recipient": {
      "name": "Acme GmbH",
      "address": "Mehringdamm 40, Berlin"
    },
    "date": "2026-07-07",
    "subject": "API access approval",
    "body": [
      "Your API access request has been approved.",
      "We attached setup details and support contacts for your integration."
    ],
    "signer": "Elena Park",
    "compensation": null
  }
};

const response = await fetch("https://api.texify.dev/render", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(payload),
  signal: AbortSignal.timeout(90_000),
});

if (!response.ok) throw new Error(await response.text());

const pdf = Buffer.from(await response.arrayBuffer());
await writeFile("formal-letter.pdf", pdf);

The template

LaTeX source sent as resources["main.tex"].

main.tex
\documentclass[11pt]{article}
\usepackage[margin=0.85in]{geometry}
\pagestyle{empty}
\begin{document}
\noindent [[ .sender.name ]]\\
[[ .sender.address ]]\\[0.25in]
[[ .date ]]\\[0.25in]
\noindent [[ .recipient.name ]]\\
[[ .recipient.address ]]\\[0.25in]
\noindent\textbf{Re: [[ .subject ]]}\\[0.2in]
[[ range .body ]]\noindent [[ . ]]\\[0.14in]
[[ end ]]
[[ with .compensation ]]\noindent\textbf{Compensation:} [[ . ]]\\[0.18in][[ end ]]
\noindent Sincerely,\\[0.35in]
[[ with .signer ]][[ . ]][[ else ]][[ .sender.name ]][[ end ]]
\end{document}

Live render

Try sample data now.

Posts this LaTeX template and sample JSON to /render, then opens the returned PDF bytes.

Sample data
{
  "sender": {
    "name": "Northstar Labs",
    "address": "18 King Street, London"
  },
  "recipient": {
    "name": "Acme GmbH",
    "address": "Mehringdamm 40, Berlin"
  },
  "date": "2026-07-07",
  "subject": "API access approval",
  "body": [
    "Your API access request has been approved.",
    "We attached setup details and support contacts for your integration."
  ],
  "signer": "Elena Park",
  "compensation": null
}

FAQ

FAQ

Can I use Formal letter as a letter PDF API?

Yes. Copy the LaTeX template, send it in resources with your data to /render, and Texify returns PDF bytes.

Can I change colors, copy, or field names?

Yes. Edit the LaTeX source and JSON placeholders to match your data model and brand before posting to /render.

Does this render real PDF text?

Yes. Texify compiles LaTeX to PDF, so text remains selectable, searchable, and stable across environments.