render

context(_: Raise<KarboneError>)
abstract suspend fun render(template: TemplateSource, data: RenderData, options: RenderOptions = RenderOptions.None): RenderedDocument

Synchronous, one round-trip: POST /render/{id}?download=true.

With a TemplateSource.Content, the template is addressed by its SHA-256; when Carbone does not know it yet, the content is uploaded and the render retried once (legacy, non-versioned template ids only).


context(_: Raise<KarboneError>)
open suspend fun render(template: TemplateSource, data: RenderData, configure: RenderOptions.Builder.() -> Unit): RenderedDocument

Same as render but RenderOptions are built inline through configure.