Answers.Body: <p>All you need to do is create a table in the first place - Add header in the top row and calculate the number of rows can fit in the page and add the footer to the bottom of the table </p>
  
  <p>Now when ever you add content to the page make sure you add to the table row by row and any empty row should be filled with <code>&amp;nbsp;</code> </p>
  
  <p>By doing this you are always setting a set row and the footer remains in the same place</p>
  
  <p>you need to create an extension for the same </p>
  
  <p>I guess this helps !!!</p>
  
  <p>If my suggestion is bit tricky - just wait for others to reply </p>
  
  <p>Thanks </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-23T22:27:43.483Z
Answers.LastActivityDate: 2019-02-23T22:27:43.483Z
Answers.UserDisplayName: Ramesh - ARTECH Consultancy
Answers.Body: <p>Use nested tables.
  The first table has a &lt; tr> with a height to where you want your footer to start then nest a table within the &lt; td> to hold your Smarty query. You can use valign="top" to put your data at the top of the row rather than centered. As long as your Smarty query results are not bigger than your row height, your footer will always be in the same place.
  Add table rows as needed to create your footer.</p>
  
  <pre><code>&lt;table align="left" cellpadding="4" cellspacing="0" class="table" style="width: 875px;"&gt;
  &lt;tbody&gt;
      &lt;tr style="height:385px;"&gt;
          &lt;td valign="top"&gt;
          &lt;table align="left" cellpadding="4" cellspacing="0" class="table" style="width: 870px;border: 1px solid #281c1d;"&gt;
              &lt;tbody&gt;
                  &lt;tr style="padding: 8px; border: 1px solid #281c1d;"&gt;
                      &lt;th style="padding: 8px;"&gt;Header1&lt;/th&gt;
                      &lt;th style="padding: 8px;"&gt;Header2&lt;/th&gt;
                      &lt;th style="padding: 8px;"&gt;Header3&lt;/th&gt;
                      &lt;th style="padding: 8px;"&gt;Header4&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;!--
  {Smarty} 
  
  {foreach from=$result.values}  
  
  
  --&gt;
                  &lt;tr style="padding: 4px; border: 1px solid #281c1d;"&gt;
                      &lt;td style="padding: 4px; border: 1px solid #281c1d;"&gt;{$value}&lt;/td&gt;
                      &lt;td style="padding: 4px; border: 1px solid #281c1d;"&gt;{$value2}&lt;/td&gt;
                      &lt;td style="padding: 4px; border: 1px solid #281c1d;"&gt;{$value3}&lt;/td&gt;
                      &lt;td style="text-align:right;padding: 4px; border: 1px solid #281c1d;"&gt;$ {$value4}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;!--
  {/foreach}
  --&gt;                 
              &lt;/tbody&gt;
          &lt;/table&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Put Footer&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Add rows and columns to the footer as needed</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-26T03:06:36.663Z
Answers.LastActivityDate: 2019-02-26T05:07:06.990Z
Answers.LastEditDate: 2019-02-26T05:07:06.990Z
Answers.UserDisplayName: Iowa Boy
Body: <p>How can I fix a footer section at the bottom of the page of a Message Template? (no matter whether how much text the user is adding - the footer with our contact and donation account should always be at the very bottom of the page).</p>
  
  <p>We would like to use Message Templates and the CiviCRM action "Print/Merge Document" to let our team write a letter to a contact within CiviCRM (getting address etc. filled through tokens), export it as a PDF and print it for postal mailing. Our previous CRM software had to option to generate a Word document prefilled with the contact information and including a footer element for this.</p>
  
  <p>I found an <a href="https://forum.civicrm.org/index.php%3Ftopic=20202.0.html" rel="nofollow noreferrer">old forum question</a> about this but unfortunately it doesn't offer any solutions. </p>
  
Tags: <message-templates><pdf><printing>
Title: (How) can I add a footer fixed to the page of a message template for printing a pdf?
ThreadText: # (How) can I add a footer fixed to the page of a message template for printing a pdf?
  
  (Asked by: username_0 on 2019-02-22)
  
  How can I fix a footer section at the bottom of the page of a Message Template? (no matter whether how much text the user is adding - the footer with our contact and donation account should always be at the very bottom of the page).
  
  We would like to use Message Templates and the CiviCRM action "Print/Merge Document" to let our team write a letter to a contact within CiviCRM (getting address etc. filled through tokens), export it as a PDF and print it for postal mailing. Our previous CRM software had to option to generate a Word document prefilled with the contact information and including a footer element for this.
  
  I found an [old forum question](https://forum.civicrm.org/index.php%3Ftopic=20202.0.html) about this but unfortunately it doesn't offer any solutions.
  
  **Tags:** message-templates, pdf, printing
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-02-23. Score: 1
  
  All you need to do is create a table in the first place - Add header in the top row and calculate the number of rows can fit in the page and add the footer to the bottom of the table
  
  Now when ever you add content to the page make sure you add to the table row by row and any empty row should be filled with `&nbsp;`
  
  By doing this you are always setting a set row and the footer remains in the same place
  
  you need to create an extension for the same
  
  I guess this helps !!!
  
  If my suggestion is bit tricky - just wait for others to reply
  
  Thanks
  
  
  ---
  
  ### Answer by username_2 on 2019-02-26. Score: 1
  
  Use nested tables.
  The first table has a < tr> with a height to where you want your footer to start then nest a table within the < td> to hold your Smarty query. You can use valign="top" to put your data at the top of the row rather than centered. As long as your Smarty query results are not bigger than your row height, your footer will always be in the same place.
  Add table rows as needed to create your footer.
  
  ```
  <table align="left" cellpadding="4" cellspacing="0" class="table" style="width: 875px;">
  <tbody>
      <tr style="height:385px;">
          <td valign="top">
          <table align="left" cellpadding="4" cellspacing="0" class="table" style="width: 870px;border: 1px solid #281c1d;">
              <tbody>
                  <tr style="padding: 8px; border: 1px solid #281c1d;">
                      <th style="padding: 8px;">Header1</th>
                      <th style="padding: 8px;">Header2</th>
                      <th style="padding: 8px;">Header3</th>
                      <th style="padding: 8px;">Header4</th>
                  </tr>
                  <!--
  {Smarty} 
  
  {foreach from=$result.values}  
  
  -->
                  <tr style="padding: 4px; border: 1px solid #281c1d;">
                      <td style="padding: 4px; border: 1px solid #281c1d;">{$value}</td>
                      <td style="padding: 4px; border: 1px solid #281c1d;">{$value2}</td>
                      <td style="padding: 4px; border: 1px solid #281c1d;">{$value3}</td>
                      <td style="text-align:right;padding: 4px; border: 1px solid #281c1d;">$ {$value4}</td>
                  </tr>
                  <!--
  {/foreach}
  -->                 
              </tbody>
          </table>
          </td>
      </tr>
      <tr>
          <td>Put Footer</td>
      </tr>
  </tbody>
  </table>
  
  ```
  
  Add rows and columns to the footer as needed
  
  
  ---
  
  