Simple Mail Merge PDF Letter
Imports: 11

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.

Preview

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 = 'https://pcochef.com/static/images/brand/logo.png'%}

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">
  <head>
    <meta charset="utf-8">
    {{ helpers.bootstrap_3 }}
    <!-- This report is styled using the Bootstrap framework. http://getbootstrap.com/css/ 
				 If you'd rather provide your own styles, add them to the style section below. -->
    
    <style>
      	.person { page-break-inside: avoid; page-break-after: always;}
      	img.org-logo {height: 70px;}
      blockquote {
    border-left: none;
		}
    </style>
  </head>
  
  
  <!-- This is what makes the "Print to PDF" link at the top" -->
  <body>
    <div class="hidden-print">
      <div class="alert alert-warning hidden-print" role="alert">
        <a href="https://people.planningcenteronline.com/reports/{{ report.id }}.pdf?list_id={{list.id}}" class="alert-link">Print to PDF</a>
      </div>    
    </div>
    
    
    <!-- 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. -->
       <div><br>
         
       
         {% 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 img.org.logo.-->   
        	<!-- Make your logo justify right -->
          <div class="pull-right">
         	<img class="org-logo" src="{{ org_logo }}"></div>
         
         	{% endif %}
        
        
        {% if org_name != 'false' %}
        <h2>
          {{ organization.name }}</h2><hr>
         {% else %}
                     <br><br><br>
         {% endif %}
         
         <!-- Add or remove <br> to adjust the spacing below Organization Name and the salutation. -->
         
        <br>
         
         <!-- 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>
                              {{ address.postal_address }} <!--({{ address.location }})-->
                            </address>
                          {% endfor%} 
            <!-- If there's no address keep the spacing the same on the letter! -->
            {% else %}
       		  <br><br><br><br>
            {% endif %}
            {% endif %}
           
          </div>
            
          
          <!-- This is the Salutation. -->  
          <div class="media-body">
          <h4 class="media-heading">Welcome to PCOchef 
                  {{ person.last_name }}
                  {{ person.name_suffix }}Family!
              <br>
              <br>
            </h4> 
            
            
            
            <!-- This is the body of your letter. Put two <br> at the end of each paragraph. -->
            <body><p>
              

Welcome to pcochef.com! 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://https://baconipsum.com/">https://baconipsum.com/</a>
              <br>
              <br>
              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.
<br><br>
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.
<br><br>
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 %}
              <h4>{{signature}}</h4>
            </p></body>
          
        </div>

        
      </div>
  </div>
  </div>
    {% endfor %}
    </div>
  </body>
</html>