Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent Printing from Web Browser 2

Status
Not open for further replies.

davman2002

Programmer
Nov 4, 2002
75
US
I have a web page that I created that contains proprietary information. My boss has asked me to secure the web site and not to allow the end user to print the information contained on the site. Does anyone know of who I can restrict the user by not allowing any printing of my page?
 
Well, this won't stop them from copying from the page and pasting it, or opening the file from the temporary internet files and printing it, or opening the file with an xmlhttp object and printing it, or opening it in a non-CSS compliant browser and printing it (I think you get the idea...), but:
Code:
<html>
<head>
<style media=&quot;print&quot;>
   .mybody{
      display:none;
   }
   .warning{
      display:inline;
   }
</style>
<style media=&quot;screen&quot;>
   .warning{
      display:none;
   }
   .mybody{
      display:inline;
   }
</style>
</head>
<body class=&quot;mybody&quot;>
You can see me in the browser, but can't print me
</body>
<div class=&quot;warning&quot;>
This is proprietary information.
</div>
</html>

This is on the fly, but it should work.

Basically once you place information on the web the only way you can protect it is with a nifty little &copy;
The user must download the file containing your proprietary information to their own computer before the browser can display it, so no matter how many protections you take it will always be possible for the user to copy it in some manner. The only thing I can tell you is if it is that important, don't put it on the web.

Sorry I couldn't be of more help,
-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
 
tell your boss &quot;Resistance is Futile&quot;

there are just way to many ways to print the pages.
view source options
print screen key
selecting all contents
and on....
and on.......

it really isn't worth it. if he's is that concerned he may want to consider keeping it on your net and not put it online. I dare to learn more
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top