Skip to main content

render_template

Function render_template 

Source
pub fn render_template(
    template_json: &str,
    data_json: &str,
) -> Result<Vec<u8>, FormeError>
Expand description

Render a template with data to PDF bytes.

Takes a template JSON tree (with $ref, $each, $if, operators) and a data JSON object. Evaluates all expressions, then renders the resulting document to PDF.