最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Using pdfmake - generate pdf tool in AngularJS - Stack Overflow

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论