0

I want to create pdf file and save it into the folder. I have created code for create pdf but its not working for save pdf into folder.

My code is :

  $scope.export = function(){
        $scope.hidebutton = false;
            var date = new Date();
            $scope.FromDate = $filter('date')(new Date(), 'ddHHMMmmyyyyss');        
            html2canvas(document.getElementById('printPlanId'), {
                onrendered: function (canvas) {
                    var data = canvas.toDataURL();
                    var docDefinition = {
                        content: [{
                            pageSize: 'A4',
                            image: data,
                            width: 500,     
                        }]
                    };
                    pdfMake.createPdf(docDefinition).download($scope.FromDate+"-"+"report.pdf");                                

                }
            });

I want to save pdf into folder.

Ranjeet singh
  • 794
  • 1
  • 16
  • 38

0 Answers0