ng-dom-to-pdf
Convert DOM elements to PDF file and download it.
Usage
-
Run bower/npm install the package
npm install ng-dom-to-pdf --save
bower install ng-dom-to-pdf --save
-
Include the package and the required dependencies in the index html:
Using bower:
Using npm:
-
Add the angular module to the app dependencies:
angular; -
Use the directive in the your html:
<!--Below block will contain the button with the attribute to perform download on clickRequired attributes: pdf-download-button, pdf-element-id.Optional attributes: pdf-name (default: 'download'), creating-pdf-class-name(default: 'creating-pdf')-->Download As PDF<!-- below block will be saved as pdf on click-->Hello World