How to print a webpage with a background image?

I am trying to print a webpage form in IE with a background image; Now the problem is that the background image is not displayed in its print. Is there a way to fix this because I tried many tricks, but none of them actually work. if any of you corrected it before sharing.

+5
source share
7 answers

It is just for people who can spend a lot of time printing css images. It may not work 100%, but you can choose here.

Solution: impossible (if overlapping images are present in the user interface)

 $('#rootdiv').find('div').each(function(){
    if( $(this).css("background-image") !=  "none"){

        $(this).css("overflow" ,"hidden").css("position", "relative");
        $(this).prepend('<img style="display: block;position: absolute;" src="'+$(this).css("background-image").replace(/"/g,"").replace(/url\(|\)$/ig, "")+'">');

        $(this).css("background",'..');

    }
 });

PS: , div (.. $(this)) ( src img ),

+3
+2

"" > " ", "". "", " ".

IE 8.0, .

, , . !

+1

, - "show background-image".

, - , " " .

0

IE - / .

, , , , CSS.

? , , (, , ), , .

0

google: http://www.steve.maurer.net/tutorials/software_tutorials/background_print_id.htm

Just checked, and the option is still in IE8.

The default value is not to print background and image colors, possibly to save ink.

-1
source

All Articles