【问题标题】:Using pdfmake - generate pdf tool in AngularJS使用 pdfmake - 在 AngularJS 中生成 pdf 工具
【发布时间】:2015-02-07 21:03:03
【问题描述】:

使用“凉亭安装 pdfmake” 我已经下载了相关文件以便使用 pdfMake。

我想以角度使用这个库。

这是我的示例代码

角度控制器:

    $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>

我错过了什么?为什么这不起作用?

【问题讨论】:

    标签: javascript angularjs pdf pdf-generation pdfmake


    【解决方案1】:

    找到了! 我错过了在我的主页 html 文件中导入 pdfMake 插件。

    【讨论】:

    • 你能得到原始的 Html 来处理这个吗?我可以让静态文本像上面那样工作,但不是 HTML。
    • 导入了什么?
    猜你喜欢
    • 2016-03-07
    • 2015-04-23
    • 2016-09-23
    • 2018-01-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-27
    • 1970-01-01
    相关资源
    最近更新 更多