0

I'm confused on how would i use this package https://www.npmjs.com/package/ng-pdf-make so i can print/save my page in PDF format. Can anyone help me out in using this package? If i have this "section class" in my code, how would i able to print/save this to PDF? Or if you have any package that could recommend. Thank you.

<section class="product">
  <div class="container-fluid">
    <header> 
      <h1>
        <button class="btn btn-primary" (click)="Print()"><i class="fa fa-print" aria-hidden="true"></i> Print</button>
      </h1>
    </header>
    <div class="row">
      <div class="col-lg-6">
        <div class="card">
          <div class="card-block">
            <table class="table">
              <tr>
                <th>Purchase Order ID: </th>
                <td>{{orders.id}}</td>
              </tr>

              <tr>
                <th>Product:</th>
                <td>{{product.name}}</td>
              </tr>
            </table>
          </div>
        </div>
      </div>
</section>
  • [ng-pdf-make](https://www.npmjs.com/package/ng-pdf-make) is a wrapper for [pdfmake](http://pdfmake.org), which generates PDF by its own document definition JS object. It is strong for generating text-based document, but not fore html-to-pdf. You can check out [this QnA](https://stackoverflow.com/questions/18191893/generate-pdf-from-html-in-div-using-javascript). This will guide you to [jspdf](https://parall.ax/products/jspdf) and some of its plugins. – soundlake Dec 26 '17 at 11:32

0 Answers0