Solved

Disable printing or the print dialog in browser

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

733 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