See demo: http://jsfiddle.net/rathoreahsan/x69UY/
What do you think if you do this:
<div id="printableDiv"> <style type="text/css"> @media print { #printable { color: red; // Any Other style you want to add } } </style> <div id="printable"> This Text will print in red color. </div> </div>
Javascript / jQuery Code:
w=window.open(); w.document.write($('#printableDiv').html()); w.print(); w.close();
In this scenario, when a popup window opens and receives the printableDiv HTML code, printer styles will be included in this popup window so that the printer reads the styles from the popup window and prints in this way.
Ahsan rathod
source share