Output formats & metadata
Every template can render to any of five formats. PDF is the default.
| Format | Sync: Accept header |
Jobs: format |
|---|---|---|
application/pdf (or omit Accept) |
pdf (or omit) |
|
| PNG | image/png |
png |
| JPEG | image/jpeg |
jpeg |
| HTML | text/html |
html |
| DOCX | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
docx |
An unsupported Accept value returns 406 not_acceptable. The file extension of
filename is replaced to match the format, so "filename": "INV-1042" downloads as
INV-1042.png when you ask for PNG.
curl https://api.doquill.com/v1/render \ -H "Authorization: Bearer $DOQUILL_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: image/png" \ -d '{"template_id": "<template-id>", "data": {"number": "INV-1042"}}' \ -o INV-1042.pngWhat each format includes
Section titled “What each format includes”| PNG / JPEG | HTML | DOCX | ||
|---|---|---|---|---|
Page settings and @page |
Yes | No | No | Yes |
| Multiple pages | Yes | One image | One document | Yes |
| Headers and footers | Yes | No | No | Text only |
| Built-in Tailwind | Yes | Yes | Yes | No |
| Document metadata | Yes | No | No | Yes |
The reference format: what the editor preview shows, with full CSS support.
PNG and JPEG
Section titled “PNG and JPEG”A screenshot of the whole document body as one image, as wide as the content (1200 px when the content has no width of its own). Page settings, page breaks, headers and footers don’t apply. Useful for thumbnails, previews and social images. JPEG is saved at quality 85.
The template rendered to a self-contained HTML document with the CSS inlined, as it is handed to the PDF printer. Images are links to your assets that expire after 5 minutes, so HTML output suits immediate display, not storage.
An editable Word document, converted from the rendered HTML by LibreOffice. Expect simpler styling than the PDF:
- Tailwind classes have no effect, because the converter can’t read Tailwind’s CSS. Use plain CSS in templates you render to DOCX.
- Headers and footers keep their text but lose styling and page numbers.
- Auto-height templates paginate at A4 height.
- Complex layouts (grid, absolute positioning) may be simplified. Tables, headings, paragraphs and basic text styling convert well.
Document metadata
Section titled “Document metadata”metadata sets the document properties PDF viewers and Word show in their properties
dialogs, and that search engines and document management systems index:
{ "template_id": "<template-id>", "data": { "number": "INV-1042" }, "metadata": { "title": "Invoice INV-1042", "author": "Northwind Studio", "subject": "Invoice for October 2026", "keywords": "invoice, northwind, acme" }}| Field | Max length |
|---|---|
title |
500 |
author |
255 |
subject |
500 |
keywords |
1000 |
All fields are optional. Metadata applies to PDF and DOCX, and is ignored for other formats.