title: Build a PDF from a template in Ruby on Rails
body: <p>I would like to create a template in doc, pdf, odt, docx ... document type does not matter.
  What I want is to get this document, change some values ​​and convert this document to PDF.</p>
  
  <p>For example:</p>
  
  <p>Take this template:</p>
  
  <pre><code>&lt;Title&gt;
  &lt;Date&gt;
  
  Hello &lt;Name&gt;,
  
  &lt;Text&gt;
  
           &lt;Farewell&gt;
  </code></pre>
  
  <p>And with this information:</p>
  
  <pre><code>Title: attention
  Date: 22/05/2011
  Name: NicosKaralis
  Text: Lorem ipsum ...
  Farewell: See you later
  </code></pre>
  
  <p>generate this pdf document, using color, background and anything that may have the template:</p>
  
  <pre><code>attention
  22/05/2011
  
  Hello NicosKaralis,
  
  Lorem ipsum ....
  
           See you later.
  </code></pre>
  
  <p>There are any way to do this in Ruby on Rails?
  preferably using prawn</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>-- EDIT --</strong></p>
  
  <p>1 The owner of the application will create something like this: <a href="https://docs.google.com/document/d/1oOh6d68--aWx03YlE8aZq_o5YqNZJAqszyFEo83_gec/edit?hl=pt_BR" rel="noreferrer">Original.(odt, doc, pdf)</a></p>
  
  <p>2 My app database will have a user with this attributes:</p>
  
  <blockquote>
    <p>title = Welcome to the internet!</p>
    
    <p>name = Jhon Doe</p>
    
    <p>text = Welcome to the internet, i will be your guide</p>
    
    <p>farewell = Hope to see you soon!</p>
  </blockquote>
  
  <p>3 My app will create a pdf like this: <a href="https://docs.google.com/document/d/1iRLdnqBjZ2E1H99SfrExz-H65ckkhoIkEJD1kMYdktI/edit?hl=pt_BR" rel="noreferrer">Final.pdf</a> and send it by email</p>
  
  <p>The email part i already have working. I just don`t have the pdf.</p>
  
  <blockquote>
    <p>P.S.: I now how to create a pdf from scratch, but i dont want that.
    The point of this application is that you don`t need to be a rails
    developer to change the pdf that is generated.</p>
  </blockquote>