Create a css file to print in the application as follows:
File name: print.css
#myobject {
background-color: white;
}
In the application header, include the file as follows:
<link rel="stylesheet" href="print.css" type="text/css" media="print" />
Pay attention to media = "print" when I included the stylesheet. This will apply your white background to the object only when printing. A.
source
share