admin管理员组

文章数量:1415645

Using 'bower install pdfmake' I've downloaded the relevant files in order to work with pdfMake.

I want to work with this library in angular.

This is my sample code

angular controller:

    $scope.pdfMaker = function(){
        var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
        pdfMake.createPdf(docDefinition).open();
    }

html:

 <button ng-click="pdfMaker()">run pdf</button>

What am I missing? why this does not working?

Using 'bower install pdfmake' I've downloaded the relevant files in order to work with pdfMake.

I want to work with this library in angular.

This is my sample code

angular controller:

    $scope.pdfMaker = function(){
        var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
        pdfMake.createPdf(docDefinition).open();
    }

html:

 <button ng-click="pdfMaker()">run pdf</button>

What am I missing? why this does not working?

Share Improve this question edited Dec 11, 2014 at 21:00 john Smith asked Dec 9, 2014 at 20:13 john Smithjohn Smith 1,6058 gold badges37 silver badges54 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

found it! I missed to import of the pdfMake plugin in my home html file.

本文标签: javascriptUsing pdfmakegenerate pdf tool in AngularJSStack Overflow