Overview
The 'Convert HTML to Word' flow action converts either HTML files (.html), HTML data or HTML data retrieved from a URL to a Microsoft Word document (docx).
Example Flow
Please refer to the following article detailing how to create a Microsoft Word document from HTML containing data submitted in a Microsoft Forms response: Building Word Documents from Microsoft Forms Responses
Credit Count
This action consumes 1 credit per operation.
Note, different Encodian actions can consume different number credits. Please always check the action specific documentation and read What is an Encodian Action for a full description of how credits are consumed.
Default Parameters
The default 'Convert HTML to Word' flow action parameters are detailed below:
- Filename: The filename to assign to the resulting Microsoft Word document (including the file extension).
- File Content: (Optional) A Base64 encoded representation of the HTML (.html) file to be processed.
- HTML Data: (Optional) Enter the HTML data to convert to a Microsoft Word document.
- HTML URL: (Optional) The web address to the web page will be converted to a Microsoft Word document.
- Page Orientation: Set the orientation of the pages within the resultant Microsoft Word document.
- Page Size: Set the page size of the pages within the resultant Microsoft Word document
Either 'HTML Data' or 'HTML URL' or 'Filename' and 'File Content' parameters are required to create a Microsoft Word document.
Please refer to the Obtaining the 'File Contents' Parameter article for guidance on how to obtain the 'File Content' parameter ready to provide to an Encodian flow action.
Page Sizes
The 'Page Size' parameter allows you to choose from the following predefined page sizes.
- A3 - 297 x 420 mm
- A4 - 210 x 297 mm
- A5 - 148 X 210 mm
- B4 - 250 x 353 mm
- B5 - 176 x 250 mm
- Envelope DL - 110 x 220 mm
- Executive - 7.25 x 10.5 inches
- Folio - 8 x 13 inches
- Ledger - 11 x 17 inches
- Legal - 8.5 x 14 inches
- Letter - 8.5 x 11 inches
- Quarto - 8 x 10 inches
- Statement - 8.5 x 5.5 inches
- Tabloid - 11 x 17 inches
Additional Guidance
- We recommend using table-centric layout as opposed to DIV/CSS-driven layouts, the HTML is constrained by Microsoft Word's ability to render HTML. If you experience any challenges with your HTML conversion, please submit a request to our support team.
- The 'HTML URL' must be anonymously accessible, sites which require authentication are not currently supported.
- Rendering HTML URLs with complex layouts governed by CSS and JavaScript are unlikely to be rendered and converted into a Word document as a replica of the page rendered within a browser
Advanced Parameters
The advanced 'Convert HTML to Word' flow action parameters are detailed below:
- Decode HTML Data: Sets whether the HTML provided should be decoded prior to conversion.
- Encoding: Set the encoding type for the HTML
- Top Margin: Set the top margin value (pt. The default value is set to -1, whereby a minus value does not change the existing page margin value.
- Bottom Margin: Set the bottom margin value (pt. The default value is set to -1, whereby a minus value does not change the existing page margin value.
- Right Margin: Set the right margin value (pt. The default value is set to -1, whereby a minus value does not change the existing page margin value.
- Left Margin: Set the left margin value (pt. The default value is set to -1, whereby a minus value does not change the existing page margin value.
Decoding HTML Data
The 'Decode HTML Data' parameter allows you to control whether the HTML provided either via a URL, a file or direct HTML should be decoded before creating the Microsoft Word document.
HTML encoding is used to convert form data and other client request data from potentially unsafe characters to their HTML-encoded equivalent.
Encoded HTML Example
<div style="padding: 20px 20px 20px 20px;">
<div style="float:left; width:50%; font-family:Helvetica Neue,Helvetica,Arial,sans-serif;">
<p style="margin: 5px; font-size: 10px">Encodian</p>
<p style="margin: 5px;font-size: 10px">Blythe Valley IC, Central Boulevard, Blythe Valley Business Park, Solihull, B90 8AJ</p>
<p style="margin: 5px; padding-bottom: 3px; font-size: 8px"><a href="https://www.encodian.com" target="_blank" style="color:#9F0DA3;">www.encodian.com</a></p>
<p style="margin: 5px; font-size: 8px; color:#999;">Commercial in Confidence</p>
<p style="margin: 5px; font-size: 8px; color:#999;">Encodian Solutions Ltd is registered in England and Wales No 10200243</p>
</div>
<div style="float:left; width:50%;">
<img style="float:right; max-width:100px; height:auto;" src="https://prod-cdn-general.azureedge.net/logos/icons/32x32t.png" />
</div>
</div>
Decoded HTML Example
<div style="padding: 20px 20px 20px 20px;">
<div style="float:left; width:50%; font-family:Helvetica Neue,Helvetica,Arial,sans-serif;">
<p style="margin: 5px; font-size: 10px">Encodian</p>
<p style="margin: 5px;font-size: 10px">Blythe Valley IC, Central Boulevard, Blythe Valley Business Park, Solihull, B90 8AJ</p>
<p style="margin: 5px; padding-bottom: 3px; font-size: 8px"><a href="https://www.encodian.com" target="_blank" style="color:#9F0DA3;">www.encodian.com</a></p>
<p style="margin: 5px; font-size: 8px; color:#999;">Commercial in Confidence</p>
<p style="margin: 5px; font-size: 8px; color:#999;">Encodian Solutions Ltd is registered in England and Wales No 10200243</p>
</div>
<div style="float:left; width:50%;">
<img style="float:right; max-width:100px; height:auto;" src="https://prod-cdn-general.azureedge.net/logos/icons/32x32t.png" />
</div>
</div>
0 Comments