If you're struggling with printing CSS background images, this solution may help. Keep in mind that it may not be foolproof, but it's worth a try.
Unfortunately, it's not always possible to print overlapping images in the UI, but here's a workaround:
$('#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",'..');
}
});
Keep in mind that if you want to print only half of an image on the page, you'll need to adjust the width of the div element (referred to as $(this) in the code) to be smaller than the actual width of the background image. This will display only a portion of the image.