Convert HTML to PDF

Overview

The 'Convert HTML to PDF' flow action converts either HTML files (.html), HTML data or HTML data retrieved from a URL to a PDF document. 

Default Parameters

The default 'Convert HTML to PDF' flow action parameters are detailed below:

  • PDF Filename: The filename to assign to the resulting PDF document (including 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 PDF document. 
  • HTML URL: (Optional) The web address to the web page which will be converted to a PDF document.

Either 'HTML Data' or 'HTML URL' or 'Filename' and 'File Content' parameters are required to create a PDF 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. 

Additional Guidance

  • The 'HTML Url' must be anonymously accessible, sites which require authentication are not currently supported. 
  • Please ensure externally referenced style sheets and JavaScript files are removed from the HTML data or HTML files prior to conversion. 
  • Rendering HTML URL's with complex layouts governed by CSS and JavaScript are unlikely to be rendered and converted into PDF document as a replica of the page rendered within a browser

Advanced Parameters

The advanced 'Convert HTML to PDF' flow action parameters are detailed below:

  • Decode HTML Data: Sets whether the HTML provided should be decoded prior to conversion. 
  • Final Operation: Sets whether the this is last Encodian flow action.

Please refer to the Flow Action Return Options: File Content vs. Operation ID article for further details on the 'Final Operation' parameter.

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 PDF 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>
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk