We use cookies
We use cookies to enhance your experience and analyse site usage.
Formal letter with company letterhead, date, recipient address, body, and signature block.
<!DOCTYPE html>
<html>
<head>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Times New Roman', Georgia, serif; color: #1a1a1a; padding: 56px; line-height: 1.7; }
.letterhead { border-bottom: 3px solid #1e3a5f; padding-bottom: 20px; margin-bottom: 32px; display: flex; justify-content: space-between; align-items: flex-start; }
.company-info .name { font-size: 20px; font-weight: bold; color: #1e3a5f; }
.company-info p { font-size: 12px; color: #555; margin-top: 4px; }
.ref-block { text-align: right; font-size: 12px; color: #555; }
.date { margin-bottom: 28px; font-size: 14px; }
.recipient { margin-bottom: 28px; font-size: 14px; }
.subject { font-weight: bold; margin-bottom: 24px; font-size: 15px; text-decoration: underline; }
.body-text { font-size: 14px; margin-bottom: 16px; text-align: justify; }
.salutation { margin-bottom: 20px; font-size: 14px; }
.signature { margin-top: 48px; }
.sig-name { font-weight: bold; font-size: 14px; }
.sig-title { font-size: 13px; color: #555; }
.footer-bar { margin-top: 48px; padding-top: 16px; border-top: 1px solid #e2e8f0; font-size: 11px; color: #94a3b8; text-align: center; }
</style>
</head>
<body>
<div class="letterhead">
<div class="company-info">
<div class="name">{{company_name}}</div>
<p>{{company_address}}<br>{{company_phone}} · {{company_email}}</p>
</div>
<div class="ref-block">Ref: {{reference_number}}<br>{{letter_date}}</div>
</div>
<div class="date">{{letter_date}}</div>
<div class="recipient">
{{recipient_name}}<br>
{{recipient_title}}<br>
{{recipient_address}}
</div>
<div class="subject">Re: {{subject}}</div>
<div class="salutation">Dear {{salutation}},</div>
<div class="body-text">{{paragraph_1}}</div>
<div class="body-text">{{paragraph_2}}</div>
<div class="body-text">{{paragraph_3}}</div>
<div class="body-text">Yours sincerely,</div>
<div class="signature">
<br><br>
<div class="sig-name">{{signatory_name}}</div>
<div class="sig-title">{{signatory_title}}</div>
<div class="sig-title">{{company_name}}</div>
</div>
<div class="footer-bar">{{company_name}} · {{company_address}} · {{company_email}}</div>
</body>
</html>Sign in to open this template in the playground, or copy the HTML and use it with the API.
curl -X POST https://api.htmlpdf.dev/api/pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<!DOCTYPE html>\n<html>\n<head>\n<style>\n * { box-sizing: border-box; margin: 0; p...",
"format": "A4"
}' \
--output employment-letter.pdf