title: Generate a PDF file from JSON data using a given template
body: <p>I've been given task by a company to qualify for the final round of interview. I'm not sure how to proceed with it. Details about the same are as under. </p>
  
  <p>Assignment: Generate a PDF file from JSON data using a given template</p>
  
  <p>Description: Using a sample data file (of JSON Format) containing information like patient data, demonstrate the generation of a formatted PDF file using a formatting template. The program should be generic enough to use any such formatting templates for the given set of data. You may use of any of the programming languages - Java/C++/C#.</p>
  
  <p>Here is the json data </p>
  
  <p><code>{"medicalRecord":{"name": "Rahul", "dob": "2000-07-09","Languages known/speak":"",  "Gender":"",  "Address":"", "phone":"",  "E-mail":"",   "Medical Details":"",   "Date":"",   "Signature":""}}</code></p>
  
  <p>Here is the formatting template. </p>
  
  <p></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;style&gt;
              .myClass { font-size : 18px; padding-left: 20px; } 
          &lt;/style&gt;
          &lt;title&gt;
              Medical Report
          &lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div align="left" style="color: #0900C4; font: Helvetica 12pt;border: 1px solid black;" class="myClass"&gt;
              &lt;div align="center" &gt;
                  &lt;h1&gt;
                      &lt;u&gt;
                          Medical Report
                      &lt;/u&gt;
                  &lt;/h1&gt;
              &lt;/div&gt;
              &lt;div style="padding-left: 1000px;" &gt;
                  Date :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div style="padding-left: 1000px;"&gt;
                  Time:
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div style="padding-left: 20px;"&gt;
                  Name :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  DOB :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  Age :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  Languages known/speak :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  Gender :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  Address :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  phone :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  E-mail :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div class="myClass"&gt;
                  Medical Details :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;br/&gt;
              &lt;br/&gt;
              &lt;br/&gt;
              &lt;div style="padding-left: 1000px;"&gt;
                  Signature :
              &lt;/div&gt;
              &lt;br/&gt;
              &lt;div style="padding-left: 1000px;"&gt;
                  Date :
              &lt;/div&gt;
              &lt;br/&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>