无法加载Pdf文档html-pdf

https://plnkr.co/edit/AMJoLFiZQl7ljIZ9MOp7?p=preview这是一个plunker链接。在那个pdfSample.js是运行使用节点和pdfsample.html是实际的数据转换成PDF和generatepdf.js / HTML是用来取它。 当我运行它,给我显示一个错误无法加载PDF文档。 我认为https://github.com/bapatel1/node-html-pdf-sample 。 我没有得到任何问题,为什么它不工作? 任何人都可以帮我。

$http.get(url, {responseType: 'arraybuffer'}).then(function successCallback(response){ console.log(response); var file = new Blob([response], {type: 'application/pdf'}); console.log(file); var fileURL = URL.createObjectURL(file); $scope.loading = false; q.resolve(fileURL); }, function errorCallback(response){ $scope.loading = false; q.reject(response); }); /* .success(function (response) { }) .error(function (err) { });*/ return q.promise; }; 

Interesting Posts