How you done with the Jspdf. I am unable to open in IE , Bcoz IE blocking blob url...
here my code. viewRiskId is a div element.
converToPdf: function(viewRiskId){
html2canvas(viewRiskId, {
onrendered: function (canvas) {
var data = canvas.toDataURL("image/jpeg");
var doc ;
if(canvas.height < canvas.width){
doc = new jsPDF("l","pt",[canvas.width,canvas.height]);
} else{
doc = new jsPDF("p","pt",[canvas.height,canvas.width]);
}
doc.setProperties({
title: 'Risk Details',
});
doc.addImage(data, 'JPEG', 0, 0, canvas.width, canvas.height);
var blob = doc.output("blob");
if (navigator.appVersion.toString().indexOf('.NET') > 0){
var myWindow = window.open();
var doc = myWindow.document;
doc.open();
doc.write( "<link rel=\"stylesheet\" href=\"ui/css/style.css\" type=\"text/css\" />" );
doc.write( "<link rel=\"stylesheet\" href=\"ui/css/bootstrap.min.css\" type=\"text/css\" />" );
doc.write( "<link rel=\"stylesheet\" href=\"ui/css/fonts.css\" type=\"text/css\" />" );
doc.write( "<link rel=\"stylesheet\" href=\"ui/css/font-awesome.min.css\" type=\"text/css\" />" );
doc.write( "<title>Risk Details</title>" );
doc.write(viewRiskId.outerHTML);
doc.close();
} else{
window.open(URL.createObjectURL(blob));
}
}
});