Add HTML Header or Footer to PDF

Overview

The 'Add HTML Header or Footer to PDF' flow action inserts the HTML fragment provided into the provided PDF document's header and footer section as per the configuration supplied. 

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 'Add HTML Header or Footer to PDF' flow action parameters are detailed below:

  • Filename: The PDF filename to be processed (including the file extension).
  • File Content: A Base64 encoded representation of the PDF document (.pdf) file to be processed.
  • HTML Header / Footer: The HTML fragment to embed within the location specified.
  • Location: Set whether the HTML fragment should be added to the header, footer or both locations.
  • Skip First Page: Set whether to ignore the first page when the header/footers are added.

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

Please adhere to the following guidelines for constructing the HTML Header / Footer fragment:

  • Do not include <html>, <head> or <body> tags, simply include the HTML layout and content which you'd normally embed within a <body> tag.
  • Utilise inline style tags as opposed to externally referenced style sheets.
  • Remove all external or inline javascript. 

Advanced Parameters

The advanced 'Add HTML Header or Footer to PDF' flow action parameters are detailed below:

  • Top Margin: Set the top margin value (pt.) The default value is set to 0.
  • Bottom Margin: Set the bottom margin value (pt.) The default value is set to 0.
  • Right Margin: Set the right margin value (pt.) The default value is set to 0.
  • Left Margin: Set the left margin value (pt.) The default value is set to 0.
  • Apply To: Set which pages in the document the header, footer or both should be added to
  • Page Numbers: Sets the page numbers the header, footer or both should be added to. This setting only applies when the 'Apply To' parameter is set to 'Specific'.
  • Ignore Page Numbers: Sets the page numbers the header, footer or both should not be added to. This setting only applies when the 'Apply To' parameter is set to 'Specific'.
  • Operation ID: (Advanced) The ID of a parent operation, please refer to Flow Action Return Options: File Content vs. Operation ID
  • Return File: (Advanced) Sets whether the action should return a file or alternatively an operation ID: Flow Action Return Options: File Content vs. Operation ID

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

Example 

The following HTML fragment will generate this example header: 

<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>

3.jpg

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk