The :html
formatter renders HTML content on DOCX
, ODT
and PDF
documents.
Unsupported tags, attributes and styles are skipped and not rendered.
<br>
<b>
<strong>
<i>
<em>
<u>
<s>
<p>
<a href="URL">
<ol>
<ul>
<li>
<del>
<img>
<a href="URL">
When included, the URL format needs to be verified before injecting it into the document. Learn more about #hyperlink-validation.
If a font family or/and a font size is applied on a HTML marker, the content is rendered with the same font properties. Text alignment on the rendered HTML content is not kept.
When the HTML marker is placed inside a paragraph and mixed with other content, the content is pushed in a new paragraph above or below the rendered HTML, refer to Example 2.
To render HTML lists, such as <ol>/<li>
or <ul>/<li>
, create a bullet list on the template then delete it, then the generated report will render the list.
<img>
The image source attribute can be an URL or Data-URL, such as <img src="https://carbone.io/img/favicon.png"/>
or <img src="data:image/jpeg;base64,/9j...."/>
The image size is rendered based on width
and height
attributes provided by the HTML tag, such as <img src="" width="300" height="100"/>
.
values must be pixels
if width
or height
attributes are missing, the size of 5 cm (1.96 in) is applied by default while retaining the image aspect ratio