Send json data in pdf format to printer


#1

Hi..Iam retreving data from an api using $http.get..now on clicking a button i want to send this json data to printer in pdf format..i tried this code

var file = new Blob([data], { type: 'application/pdf' });
var fileURL =window.URL.createObjectURL(file);
var w=window.open(fileURL);
w.print();
but this is not working for ie..can anyone suggest the method that works for all browsers....