Mozilla firefox doesn't retain CSS when printing -
in application trying print page on click of print button. shows in print preview, in print css not maintained in mozilla firefox. however, prints shown in chrome , internet explorer.
i can't attach snapshot because data confidential here.
below code used printing..
function printwithservices() { // print var printcrmdetails = new $("#divtoprint"); var printservicedetails = new $("#divservicestoprint"); var mywindow = window.open("", "popup", "width=1000,height=600,scrollbars=yes,resizable=yes," + "toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0"); mywindow.document.write('<html><head><title></title>'); mywindow.document.write('<link href="../../content/cssforprint.css" rel="stylesheet" type="text/css" />'); mywindow.document.write('</head><body><div id="#main">'); mywindow.document.write('<center><span class="header-title-without-margin">crm doctor request details </span></center>'); mywindow.document.write($(printcrmdetails).html()); mywindow.document.write($(printservicedetails).html()); mywindow.document.write('</div></body></html>'); mywindow.print(); }
Comments
Post a Comment