3

I am using pdfMake to generate pdf in AngularJS. I have downloaded the bower package.

Do I need to inject it to my modules and controllers before I can use it?

1 Answer 1

3

You need to add the references and you can use it as follows,

$scope.downloadPdf = function() {
    pdfMake.createPdf(docDefinition).download();
};

Find this repository which has a demo with pdfMake and angularjs

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you sir, I added the references in my index html and it worked! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.