title: Angular 2 - How to export html to pdf?
body: <p>How do I make a download button for saving HTML div content as PDF file inside my angular2 project?</p>
  
  <p>This is the HTML content
  <code></p>
  
  <pre><code>&lt;div id="obrz"&gt;
    &lt;br&gt;&lt;br&gt;
    &lt;p class="float-right font-weight-bold"&gt;Образац ЗПО&lt;/p&gt;
    &lt;br&gt;
    &lt;p class="float-left font-weight-bold"&gt;Подаци о обвезнику:&lt;/p&gt;
  
    &lt;br&gt;
  
    &lt;div class="row" style="width:100%"&gt;
      &lt;div class="col-md-2"&gt;&lt;p&gt;Порески обвезник:&lt;/p&gt;&lt;/div&gt;
      &lt;div class="col-md-10"&gt;&lt;input value="{{userModel.imeIprezime}}" type="text" class="form-control form-control-sm border-1 border-top-0 border-right-0 border-left-0" style="border-bottom: 1px solid black"&gt;&lt;/div&gt;
      &lt;div class="col-md-2"&gt;&lt;p&gt;ПИБ:&lt;/p&gt;&lt;/div&gt;
      &lt;div class="col-md-10"&gt;&lt;input value="{{userModel.PIB}}" type="text" class="form-control form-control-sm border-1 border-top-0 border-right-0 border-left-0" style="border-bottom: 1px solid black"&gt;&lt;/div&gt;
      &lt;div class="col-md-2"&gt;&lt;p&gt;Адреса:&lt;/p&gt;&lt;/div&gt;
      &lt;div class="col-md-10"&gt;&lt;input value="{{userModel.ulica + ' ' + userModel.broj + ' ' + userModel.grad}}" type="text" class="form-control form-control-sm border-1 border-top-0 border-right-0 border-left-0" style="border-bottom: 1px solid black"&gt;&lt;/div&gt;
      &lt;div class="col-md-2"&gt;&lt;p&gt;Општина:&lt;/p&gt;&lt;/div&gt;
      &lt;div class="col-md-10"&gt;&lt;input value="{{userModel.opstina}}" type="text" class="form-control form-control-sm border-1 border-top-0 border-right-0 border-left-0" style="border-bottom: 1px solid black"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;br&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p></code></p>
  
  <p>P.S. I tried <a href="https://stackoverflow.com/questions/38996376/generate-pdf-file-from-html-using-angular2-typescript">this</a> jsPDF example, but it simply doesn't work for me</p>
  
  <p>Thanks in advance</p>