Playground
Write HTML, add data, and see a live preview. Generate a real PDF when ready.
Template:
Use this via API
import { Rendoc } from "@rendoc/sdk";
const client = new Rendoc({ apiKey: process.env.RENDOC_API_KEY });
const doc = await client.documents.generate({
markup: `<div style="font-family: 'Helvetica Neue', Arial, sans-serif; color: #1a1a2e; padding: 10px;">
<!-- Header -->
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px;">
<div>
<div style="width: 48px; height: 48px; background: #6c5ce7; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 20px; margin-bottom: 12px;">A</div>
<p style="font-size: 18px; font-weight: 700; margin: 0;">{{company_name}}</p>
<p style="font-size: 13px; color: #636e72; margin: 4px 0 0;">{{company_email}}</p>
<p style="font-size: 13px; color: #636e72; margin: 2px 0 0;">{{company_address}}</p>
</div>
<div style="text-align: right;">
<p style="font-size: 32px; font-weight: 800; color: #6c5ce7; margin: 0;">INVOICE</p>
<p style="font-size: 14px; color: #636e72; margin: 4px 0 0;">#{{invoice_number}}</p>
<p style="font-size: 13px; color: #636e72; margin: 2px 0 0;">Issued: {{issue_date}}</p>
<p style="font-size: 13px; color: #636e72; margin: 2px 0 0;">Due: {{due_date}}</p>
</div>
</div>
<!-- Bill To -->
<div style="background: #f8f9fa; border-radius: 8px; padding: 16px 20px; margin-bottom: 32px;">
<p style="font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #636e72; margin: 0 0 6px;">Bill To</p>
<p style="font-size: 16px; font-weight: 600; margin: 0;">{{client_name}}</p>
<p style="font-size: 13px; color: #636e72; margin: 4px 0 0;">{{client_email}}</p>
<p style="font-size: 13px; color: #636e72; margin: 2px 0 0;">{{client_address}}</p>
</div>
<!-- Items table -->
<table style="width: 100%; border-collapse: collapse; margin-bottom: 24px;">
<thead>
<tr>
<th style="text-align: left; padding: 12px 0; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #636e72; border-bottom: 2px solid #6c5ce7;">Description</th>
<th style="text-align: center; padding: 12px 0; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #636e72; border-bottom: 2px solid #6c5ce7;">Qty</th>
<th style="text-align: right; padding: 12px 0; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #636e72; border-bottom: 2px solid #6c5ce7;">Rate</th>
<th style="text-align: right; padding: 12px 0; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #636e72; border-bottom: 2px solid #6c5ce7;">Amount</th>
</tr>
</thead>
<tbody>
{{#items}}
<tr>
<td style="padding: 14px 0; font-size: 14px; border-bottom: 1px solid #eee;">{{name}}</td>
<td style="text-align: center; padding: 14px 0; font-size: 14px; color: #636e72; border-bottom: 1px solid #eee;">{{quantity}}</td>
<td style="text-align: right; padding: 14px 0; font-size: 14px; color: #636e72; border-bottom: 1px solid #eee;">\${{price}}</td>
<td style="text-align: right; padding: 14px 0; font-size: 14px; font-weight: 600; border-bottom: 1px solid #eee;">\${{total}}</td>
</tr>
{{/items}}
</tbody>
</table>
<!-- Totals -->
<div style="display: flex; justify-content: flex-end;">
<div style="width: 240px;">
<div style="display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: #636e72;">
<span>Subtotal</span><span>\${{subtotal}}</span>
</div>
<div style="display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: #636e72;">
<span>Tax (10%)</span><span>\${{tax}}</span>
</div>
<div style="display: flex; justify-content: space-between; padding: 12px 0; margin-top: 8px; border-top: 2px solid #1a1a2e; font-size: 20px; font-weight: 800;">
<span>Total</span><span>\${{total_amount}}</span>
</div>
</div>
</div>
<!-- Footer -->
<div style="margin-top: 48px; padding-top: 20px; border-top: 1px solid #eee; text-align: center;">
<p style="font-size: 12px; color: #b2bec3;">Payment terms: Net 30 · {{payment_method}}</p>
<p style="font-size: 12px; color: #b2bec3; margin-top: 4px;">Thank you for your business</p>
</div>
</div>`,
data: {
"invoice_number": "INV-2026-001",
"company_name": "Acme Studio",
"company_email": "billing@acmestudio.com",
"company_address": "456 Market St, San Francisco, CA 94105",
"client_name": "Jane Smith",
"client_email": "jane@techcorp.io",
"client_address": "789 Broadway, New York, NY 10003",
"issue_date": "March 24, 2026",
"due_date": "April 23, 2026",
"items": [
{
"name": "Web Application Development",
"quantity": 40,
"price": "150.00",
"total": "6,000.00"
},
{
"name": "UI/UX Design & Prototyping",
"quantity": 20,
"price": "120.00",
"total": "2,400.00"
},
{
"name": "Cloud Hosting (Annual)",
"quantity": 1,
"price": "299.00",
"total": "299.00"
}
],
"subtotal": "8,699.00",
"tax": "869.90",
"total_amount": "9,568.90",
"payment_method": "Wire transfer to Acme Studio LLC"
},
filename: "document.pdf",
});
console.log(doc.downloadUrl);