HTML Render

The HTML Render Node inserts JSON Content into placeholders in an HTML Template and returns the generated HTML Document.

Revision History

1.0.0.6 Initial release.

Properties

Template

Type: Multiline Text Input
The HTML Template containing placeholders for JSON Content.

Content

Type: Multiline Text Input
JSON Content that Flowgear inserts into the HTML Template based on matching field names.

Document

Type: Multiline Text Output
The generated HTML Document after Flowgear inserts the Content.

Remarks

Placeholders

The Document is generated by replacing placeholders in the HTML Template with JSON Content.

Placeholders use double curly braces, e.g. {{placeholder}}.

Container Attribute

Use containers to repeat headers and footers when you render the content into a PDF with the PDF Render Node.

Use these container attributes when a block needs to continue onto another page:

  • max-rows-count limits a container by row count.
  • max-height limits a container by rendered height.
  • parent names the container to duplicate when the limit is reached.

Do not set max-rows-count and max-height on the same container.

{{placeholder container}} html content{{/placeholder}}

Provide the container as an array in JSON Content, even if it contains only one object.

Only one container is allowed at each hierarchy depth. You cannot have sibling containers at the same level.

Page Number Tokens

If your template needs page numbers, add _currentPageNo and _totalPageNo inside the repeated pages container.

You can also set max-height and parent on a nested container. If the nested container exceeds the max-height, the content before and after it in the specified parent is copied. One scalar within the nested container must include a height attribute.

{{nestedcontainer container max-height="365px" parent="parentcontainer"}}

Height Attribute

The height attribute is required for one scalar when the container uses max-height. The value can be fixed or calculated from the font and width it uses.

{{placeholder height="10px"}}{{placeholder height="calculated" font-name="Calibri" font-size="10px" width="100px"}}

Format Attribute

The format attribute specifies scalar formats and uses the .NET String.Format() method.

If you use a number format, provide the value as a number in JSON, not as a string.

{{placeholder format="#,##0.00"}}

Using Samples

This Node provides Basic Samples. Use Node Samples to obtain sample requests to get started.

See Also

The PDF Render Node is typically used after the HTML Render Node to render the generated HTML into a PDF.