Generate Documents
Preview drafts, publish a catalog release, and generate real PDFs from a template and data.
User guide navigation
On this page
Generate documents
Epistola turns a template and data into a PDF. This happens in two stages. While you author, you check the result in the preview. After that, Epistola generates real documents from a released version of the catalog.
Preview while editing
The preview shows your work in progress with the example data you selected. Open it from the editor. Check wording, expressions, formatting, page breaks, optional content, tables, images, and repeated sections.
The preview updates as you edit. It is meant for authors and carries a PREVIEW watermark. It is not the real document.
Switch between a few examples while you work. Test long values and empty optional values. Test both sides of a condition. Test short and long repeated data. That way you see layout problems before you publish.
Prepare a production release
Follow these steps for a document you will generate for real cases:
- Edit the template in the catalog’s Next release, and configure the data contract and examples.
- Preview it with data that is typical in practice.
- Fix problems with validation, quality, and layout.
- Choose Publish… in the catalog. Epistola gives the release a version number, such as
1.4.0. - Share that version and the data examples with the owner of the connected system.
With variants, one template can have different languages, audiences, or layouts. The purpose of the document stays the same.
Which release a request gets
A connected system, such as Valtimo, sends data that matches the template’s data contract. Epistola then picks the release to render:
- If the request names no environment and no version, Epistola renders the highest release (the highest version number) of the catalog.
- If the request names a version or a version range, such as
^1.4.0, Epistola renders the highest release that matches. - If the request names an environment, Epistola renders what that environment serves. A test environment can also follow a draft; those documents carry a preview watermark. An environment marked as production serves only releases.
You do not have to use environments. They help when you want to decide in Epistola which release a connected system gets. You deploy a release to an environment on the catalog’s Deployments page. The whole route is explained in From template to document.
The release decides the variant, theme, fonts, images, stencils, and data contract of the PDF. Details about connecting and authentication are in Connected Systems.
Generate many documents
If you need documents from the same template for many records, use a batch. A batch holds up to 10,000 items and starts one job you can follow on the Generation page.
Each item renders on its own. Review each failed item on its own: if one record is invalid, the other records still get their documents.
Troubleshoot the result
When output is missing or unexpected, check:
- Required data is present and matches the data contract.
- The right variant is selected.
- The release you expect contains your change. A change in the Next release is not in a document until you publish it, unless a test environment follows your work.
- If the request uses an environment, that environment serves the release you expect.
- Expressions and conditional or repeated blocks show in the preview without errors.
- Fonts, images, page breaks, headers, and footers look as expected.
- You have looked at failed batch items, with their own error details.
Output
Epistola currently generates PDF documents. The system or workflow that requested the document can give it a filename. It also decides what happens next: download, storage, or attachment to a case.
Epistola is open source, not free of cost. The organisations that use it fund its development, through Epistola or an Official Partner. We are steward-owned: fair prices, no profit maximisation. How Epistola is funded →