I am printing one page from my web application from different browser. It contains some small images like tick mark, question mark on page.
Now my problem is that it is not printing images on print out. in IE it works fine and print images but in Google Chrome, Firefox it is not printing images.
Can any one have an idea what to do to print images in print out from Chrome and Firefox?
Thanks in advance.
below is my code for generating image in page.
I am preparing cell with class called ‘tickmark’.
HtmlTableCell tc = new HtmlTableCell();
tc.InnerText = "";
if (Convert.ToInt64(result[h]) == 1)
{
tc.InnerHtml = "<b class='tickmark'></b>";
}
trContent.Cells.Add(tc);
and tickmark class having code:
b.tickmark { background:url(../images/tickmark.png) no-repeat; width:13px; height:10px; display:block; vertical-align:middle; margin:0 auto; }
Modern browsers do not print background images. These CSS images are meant for styling.
If that image is important, have it embeded on your page. images in a
<img/>tag will work.To avoid breaking your current layout, you can do this:
Have another css file print.css and link it as follows:
html:
main.css
print.css