Insert HTML to PDF

Overview

The 'Insert HTML to PDF' flow action inserts the HTML data provided into the PDF document provided. The HTML data will be inserted as a new pages(s), either at the end (default) or the beginning of the PDF document.  

Example Flow

Please refer to the following article showcasing the 'Insert HTML to PDF' flow action: Create and insert a document approval sheet using PowerAutomate Approval data

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 'Insert HTML to PDF' flow action parameters are detailed below:

  • Filename: The PDF filename to be processed (including file extension).
  • File Content: A Base64 encoded representation of the PDF document (.pdf) file to be processed.
  • HTML Data: Enter the HTML data to insert into the PDF document.
  • HTML Insert Location: Sets whether the 'HTML Data' should be added to the beginning (Prepend), end (Append) of the PDF document or a specific (Specific) page location.
  • Page Number: Sets the page number to insert the HTML Data (New page(s)) into, only applies when the 'HTML Insert Location' is set to 'Specific'.
  • Page Orientation: Set the orientation of the page(s) inserted into the PDF Document.
  • Page Size: Set the page size of the page(s) inserted into the 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. 

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

  • Encoding: To assure correct rendering of all characters contained within the HTML document, please add a <meta> charset attribute to the <head> tag to explicitly set the character encoding of the document prior to conversion to PDF. Further guidance can be found here
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

Advanced Parameters

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

  • ViewPort: Set the viewport used to render the HTML.
  • Top Margin: Set the top margin value (pt.) The default value is set to 25.
  • Bottom Margin: Set the bottom margin value (pt.) The default value is set to 25.
  • Right Margin: Set the right margin value (pt.) The default value is set to 25.
  • Left Margin: Set the left margin value (pt.) The default value is set to 25.
  • Decode HTML Data: Sets whether the 'HTML Data' provided should be decoded prior to conversion. 
  • Operation ID: (Advanced) The ID of a parent operation, please refer to Flow Action Return Options: File Content vs. Operation ID

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk