Solved

Disable printing or the print dialog in browser

Posted on 2014-11-17
3
112 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now