Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Disable printing or the print dialog in browser

Posted on 2014-11-17
3
119 Views
Last Modified: 2014-11-17
Is it possible to disable the print dialog in the browser with JavaScript or some other coding method? If so, how?

I do not want to allow users to print a certain web page. Thanks.
0
Comment
Question by:earwig75
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40448482
No, that is out of your control.
0
 
LVL 6

Accepted Solution

by:
Rafael I earned 500 total points
ID: 40448491
one way would be to include this css on your webpage. it will hide the page content when printing.
<style type="text/css" media="print">
    body { visibility: hidden; display: none; }
</style>

Open in new window

however, with the proliferation of articles and tools on the net, it is impossible to prevent printing a webpage. JavaScript can be disabled, css can be edited, and screenshots can be taken - all to get something printed. sorry for being negative. hopefully, you can still use this.
0
 
LVL 2

Expert Comment

by:Jack D
ID: 40448531
I learned recently that a simple (c) or (r) at the bottom of your website offers you some protection from people being able to reproduce your work. It's nothing more than a symbol, but if this were trade secrets or something proprietary, the copyright/registered mark on a page would give you legal ground to take them to court. Good luck.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question