I am using below code to print the contents between two div tags, The code works fine except the background color of the web page also shows up in the printout.
Is it possible that I can force the print to be only done in black and white or somehow remove the blue color in the javascript code: below is the code that works fine:
function printContent(el) {
var restorepage = $('body').html();
document.getElementById('<%=lblDateTime.ClientID %>').style.display = "block";
document.getElementById('<%=lblDateTime.ClientID %>').innerHTML = new Date().toLocaleString();
document.getElementById('<%=acrLogo.ClientID %>').style.display = "block";
document.getElementById('<%=compName.ClientID %>').style.display = "block";
var printcontent = $('#' + el).clone();
printcontent.removeAttr('style');
$('body').empty().html(printcontent);
window.print();
$('body').html(restorepage);
}
I just don't want the printout background color in blue.
Is their any way, I can disable the background color from blue to white.
any help will be highly apprecaited.