Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default checked/enabled background graphic option in print preview using window.print

I want to be default checked the background graphic option in the print preview window by using javascript or CSS?

enter image description here

Thank you.

like image 502
hibino Avatar asked Feb 24 '16 10:02

hibino


1 Answers

Below option help me to archive in chrome, but not in Firefox.

<style type="text/css" media="print">
    * {
        -webkit-print-color-adjust: exact !important; /*Chrome, Safari */
        color-adjust: exact !important;  /*Firefox*/
    }
</style>
like image 179
Jaison James Avatar answered Nov 18 '22 04:11

Jaison James