Solved

Disable printing or the print dialog in browser

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

770 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