I would like tot give my Print this Page
button a special magical property sothat it automatically enabled the by default unset property (see picture) namely to Do Print the Backgrounds of div colors and bg images etc.
<a href="#" onclick="javascript:window.print()"><? echo __('Print'); ?></a>
Clues, ideas, code, answers or suggestions as answers are all tremmendously wele and I a will appreciate any hints at all for this dream to e true. Thanks in advance.
I would like tot give my Print this Page
button a special magical property sothat it automatically enabled the by default unset property (see picture) namely to Do Print the Backgrounds of div colors and bg images etc.
<a href="#" onclick="javascript:window.print()"><? echo __('Print'); ?></a>
Clues, ideas, code, answers or suggestions as answers are all tremmendously wele and I a will appreciate any hints at all for this dream to e true. Thanks in advance.
Share Improve this question asked Mar 21, 2011 at 3:28 SamSam 15.5k25 gold badges96 silver badges153 bronze badges3 Answers
Reset to default 4This cannot be done, unfortunately. This is disabled across all browsers by default (unless a user changes it in their settings).
This is not possible . You cannot change the browser settings , if that would be possible people could hack in very easily
You can use something like below
<style>
@media print {
*{
-webkit-print-color-adjust: exact !important; //for chrome
Safari color-adjust: exact !important; // For Firefox
}
}
</style>