You need this first line of code:

var blob = new Blob([response], {type: 'application/pdf'});   
window.saveAs(blob, "Report.pdf");


On Tuesday, March 17, 2015 at 2:22:03 AM UTC-4, Muhammad Omer wrote:
>
> Hello all,
>
> i want to know that how can i export pdf file from angularjs. ive exported 
> excel file and it is working fine.
>
> following is code for excel
>
>
>    * $scope.exportData = function () {*
> *        debugger;*
> *        var blob = new 
> Blob([document.getElementById('export').innerHTML], {*
> *            type: 
> "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"*
> *        });*
> *        window.saveAs(blob, "Report.xls");*
> *    },*
>
> how to do 
> *type: 
> "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"*
>  <======this 
> line
> in pdf?
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to