Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I prevent users from printing a web page?

page printing Users web
0
Posted

How do I prevent users from printing a web page?

0

The best available technique is a very simple one. The cascading style sheet specification offers a way to assign particular styles to particular media — in other words, to treat printers and monitors differently. This is typically used to provide more attractive printed output, but we can use it to prevent easy printing of a web page. Notice that I said “easy printing.” The user could still save a copy of your web page, edit the HTML, and remove the special style attributes. And if the user doesn’t find a way to do that, they can still use the “print screen” button or otherwise capture screen displays and then print them out with any good graphics program. This technique is useful as a reminder that you have not given the user permission to print out the page in question; it is a way of keeping honest people honest, in other words. But nothing can stop a skilled and determined user from printing out a web page.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123