Home / Web Development / CSS / How to Print backgroound image or color in PHP or HTML

How to Print backgroound image or color in PHP or HTML

Good Morning to all,
After a long time we discuss one useful topics in PHP also in HTMl. It’s very helpful for developers in web development. Everyone familure with print() in PHP and HTML. But nobody try to print background image or color in html page. Print particular div in print screen is very easy. But nobody knows how to implement background image in print screen using HTML or PHP. All are familure @media print in css. The @media print in css, helps to specify the style in print screen.

Print Example :

In the above code we can’t view the background image in print screen. Next we try to solve this problem.
We can specify the styles in print screen using style tage.

Print backgroound image or color in PHP or HTML

Next we move to one important topic related to print background image or color in print screen using PHP or HTML.

In the above code, print() will helps to print html data from page. We can print the data from current page.
We can specify the styles in print screen using style tage.
The -webkit-print-color-adjust:exact; helps to view the backgroound image in print screen.

If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social Media Auto Publish Powered By : XYZScripts.com