Solved

Disable printing or the print dialog in browser

Posted on 2014-11-17
3
106 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
Comment Utility
No, that is out of your control.
0
 
LVL 6

Accepted Solution

by:
Rafael I earned 500 total points
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

772 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

15 Experts available now in Live!

Get 1:1 Help Now