Documentation/Templates
📝

Templates API

Create, manage, and generate HTML templates for PDF generation with AI assistance

List Templates

Get all templates for authenticated user

Create Template

Create a new HTML template

Get Template

Retrieve a specific template by ID

Update Template

Update an existing template

Delete Template

Remove a template

Generate Template from Prompt (AI)

Use AI to generate a template from a text description

Generate Template from PDF (AI)

Upload a PDF and let AI convert it to an HTML template

💡 Template Best Practices

Use Handlebars: Templates support Handlebars syntax for dynamic content: {{variable}}, {{#each items}}...{{/each}}

CSS for PDF: Use inline styles or <style> tags. Avoid external stylesheets.

Page Breaks: Use page-break-after: always CSS property to control pagination.

AI Generation: The AI can convert existing PDFs or generate templates from descriptions. Review and customize generated templates for best results.