title: html-pdf with ejs template
body: <p>In my application, when a user passes a test, there will automatically be generated a diploma (<code>pdf</code>). This I accomplish by using the <code>html-pdf</code> <code>node-module</code>, which retrieves the html file and makes it into a pdf.</p>
  
  <pre><code>var fs = require('fs'),
      pdf = require('html-pdf'),
      path = require('path'),
      ejs = require('ejs');
  
  
  var html = fs.readFileSync('./phantomScripts/certificate.html', 'utf8');
  var options = { filename: 'businesscard.pdf', format: 'A4', orientation: 'portrait', directory: './phantomScripts/',type: "pdf" };
  
  pdf.create(html, options).toFile(function(err, res) {
      if (err) return console.log(err);
           console.log(res);
      });
  </code></pre>
  
  <p>This conversion, from <code>html</code> to <code>pdf</code>, works perfectly and looks really good. Now what I want is to make the <code>template</code> a little bit more dynamic, meaning that depending on the user, their name appears in the <code>pdf</code>.</p>
  
  <p>I have work once with <code>ejs</code> to generate an email template, so I was thinking that my problem could be solved with that, but as mentioned I'm haven't work that much with <code>ejs</code> and can't figure out how to send <code>data</code> into my <code>ejs</code> file?</p>