从angular.js表单生成PDF

时间:2022-10-29 19:41:22

I need to make a form that upon submission uses the input to make a PDF. I am using angular for the form data and handling so it would make sense if there was a way to leverage angular in the generation of the PDF.

我需要制作一个表单,在提交时使用输入来制作PDF。我正在使用角度来处理表单数据和处理,因此如果有一种方法可以在生成PDF时利用角度,那么这将是有意义的。

1 个解决方案

#1


1  

It might help you!! http://blog.sayan.ee/angular-pdf/

它可能会帮助你!! http://blog.sayan.ee/angular-pdf/

HTML code-sample

HTML代码示例

<div class="container" ng-controller="DocCtrl">
  <ng-pdf template-url="viewer.html"></ng-pdf>
</div>

AngularJs code-sample

AngularJs代码示例

app.controller('DocCtrl', function($scope) {
  $scope.pdfUrl = '/path/to/all/pdf/' + $routeParams.pdfname + '.pdf';
});

#1


1  

It might help you!! http://blog.sayan.ee/angular-pdf/

它可能会帮助你!! http://blog.sayan.ee/angular-pdf/

HTML code-sample

HTML代码示例

<div class="container" ng-controller="DocCtrl">
  <ng-pdf template-url="viewer.html"></ng-pdf>
</div>

AngularJs code-sample

AngularJs代码示例

app.controller('DocCtrl', function($scope) {
  $scope.pdfUrl = '/path/to/all/pdf/' + $routeParams.pdfname + '.pdf';
});