Simple Mail Merge PDF Letter
Imports: 31

This is a simple mail merge letter. Features that can be turned on or off: - Organization Name - Organization Logo in header or footer - Recipient address Read the comments in the report code and edit the body of the letter. Generate a pdf from the list, and it will automatically make sure it is split by page.


Report Preview


How would you like your people sorted? ('first_name', 'last_name')
{% assign sorted_people = people | sort: 'last_name' %}

How would you like your letter signed?
{% assign signature = 'Pastor Ron Hudson'%}

What Organization Logo do you want in your header?
{% assign org_logo = ''%}

Do you want Organization Name in the header?
{% assign org_name = 'true'%}

Do you want Organization Logo in the header?
{% assign org_hlogo = 'true'%}

Do you want Organization Logo in the footer?
{% assign org_flogo = 'false'%}
Do you want Recipient Address in the header?
{% assign rcp_address = 'true'%}


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    {{ helpers.bootstrap_3 }}
    <!-- This report is styled using the Bootstrap framework. 
				 If you'd rather provide your own styles, add them to the style section below. -->
      	.person { page-break-inside: avoid; page-break-after: always;} {height: 70px;}
      blockquote {
    border-left: none;
  <!-- This is what makes the "Print to PDF" link at the top" -->
    <div class="hidden-print">
      <div class="alert alert-warning hidden-print" role="alert">
        <a href="{{ }}.pdf?list_id={{}}" class="alert-link">Print to PDF</a>
    <!-- This container is what gives your letter margins. -->
    <div class="container">
      {% for person in sorted_people %}
      <!-- Everything in the following "person" div gets repeated for each person in your list -->
      <div class="person">
        <!-- This is where the Letter Content starts the <br> give margin at the top of your page. 
				Add or remove <br> to make it fit your stationary. -->
         {% if org_hlogo != 'false' %}
        	<!-- If your not using a logo delete the <img class="org-logo" src="{{ org_logo }}"></div> line below.
					You can adjust the size by changing height 80px above where it says>   
        	<!-- Make your logo justify right -->
          <div class="pull-right">
         	<img class="org-logo" src="{{ org_logo }}"></div>
         	{% endif %}
        {% if org_name != 'false' %}
          {{ }}</h2><hr>
         {% else %}
         {% endif %}
         <!-- Add or remove <br> to adjust the spacing below Organization Name and the salutation. -->
         <!-- This is the Address on the right hand side. -->  
         {% if rcp_address != 'false' %}

          <div class="text-right text-muted">
            {% if person.addresses != empty %}
                          {% for address in person.addresses %}
                              {{ address.postal_address }} <!--({{ address.location }})-->
                          {% endfor%} 
            <!-- If there's no address keep the spacing the same on the letter! -->
            {% else %}
            {% endif %}
            {% endif %}
          <!-- This is the Salutation. -->  
          <div class="media-body">
          <h4 class="media-heading">Welcome to PCOchef 
                  {{ person.last_name }}
                  {{ person.name_suffix }}Family!
            <!-- This is the body of your letter. Put two <br> at the end of each paragraph. -->

Welcome to! I hope this neat little tool helps people do ministry faster with fewer headaches.<br>
              There's so many great ideas shared on how to speed up and streamline ministry I pray this site makes it easier to do less paperwork and more minstry!
              The following paragraphs are giberish text generated from <a href="https://"></a>
              Bacon ipsum dolor amet filet mignon ham alcatra chislic meatloaf. Shank andouille shankle, leberkas buffalo boudin meatball. Pastrami tri-tip tail porchetta chicken doner. Leberkas bresaola ham boudin chislic. Bacon picanha salami meatball rump meatloaf pastrami kevin ball tip, porchetta pork chop. Pork loin landjaeger pork spare ribs sirloin buffalo.
Beef ribs landjaeger fatback ground round ribeye pork belly ham capicola shankle ball tip pork loin. Rump short ribs picanha drumstick, bacon ball tip biltong pork belly pork pig ham hock beef alcatra spare ribs short loin. Alcatra kielbasa chicken hamburger turkey jerky. Pastrami ham hock pork chop burgdoggen alcatra shankle tri-tip meatloaf spare ribs frankfurter pork belly bresaola kevin doner. Prosciutto kevin filet mignon andouille, frankfurter bresaola pig tri-tip ham. Burgdoggen alcatra ball tip kielbasa jowl, corned beef tail kevin.
Ham ground round fatback, ball tip corned beef burgdoggen porchetta beef ribs chislic swine. Shankle pork chop pork belly ham hock sausage, capicola tri-tip bresaola ribeye. Shank pastrami ham hock, ham shankle jerky salami. Ball tip pork belly pork chop pig corned beef sirloin beef pork loin meatloaf tongue ribeye. Brisket rump boudin sausage. Jerky shankle buffalo frankfurter cow kevin tenderloin meatloaf pork chop prosciutto pork shoulder. Swine tail meatloaf sirloin turducken corned beef jowl bacon, salami fatback pork belly tri-tip biltong strip steak ribeye.              
              <!-- This is the code for the footer logo -->
              {% if org_flogo != 'false' %}
          <div class="pull-right">
         	<img class="org-logo" src="{{ org_logo }}"></div>
         	{% endif %}

    {% endfor %}