Disable web printing

A

Alan Z. Scharf

How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
application?

Thanks.

Alan
 
K

Kevin Spencer

http://www.howtodothings.com/showarticle.asp?article=83

That's a cheap amateur trick, which isn't going to prevent anyone but the
ignorant from printing the page. Bottom line is, it can't be done. Show me
any page on the Internet, and I can copy it and print it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
W

WJ

Alan Z. Scharf said:
How can I disable the IE6 Print button and Ctrl-P for an ASP.Net web
application?

Why would you want to do this ? I would be very mad as hell if my system is
altered. I am as your client, I am the owner of my system. You are not
allowed without my consent to alter my system. As soon as I see such sites
doing these types of stuff, I would never come back. So, please do not do
it. If yours is so secret or highly valuable, then put it in the safe box,
do not publish it in the 1st place.

John
 
M

Mark Rae

Why would you want to do this ? I would be very mad as hell if my system is
altered. I am as your client, I am the owner of my system. You are not
allowed without my consent to alter my system. As soon as I see such sites
doing these types of stuff, I would never come back. So, please do not do
it. If yours is so secret or highly valuable, then put it in the safe box,
do not publish it in the 1st place.

I couldn't agree more! What a moronic thing to try to do!
 
P

Peter Morris

Hi
That's a cheap amateur trick

Actually it is a very useful trick for providing two versions of a page, one
for reading, and one for printed (without adverts etc). As far as I know
there is no way at all to stop someone from printing a webpage, so for the
sake of a single line of HTML it is better to put off a large number of
people than none at all. Yes, I believe that a large number of people who
use the Internet would not know how to circumvent it because they are
computer "users" and not computer "programmers".

which isn't going to prevent anyone but the
ignorant from printing the page. Bottom line is, it can't be done. Show me
any page on the Internet, and I can copy it and print it.

Well, that's a bit like telling Superman that there is a metal which can't
be bent now isn't it :)


--
Pete
====
Audio compression components, DIB graphics controls, FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com
 
K

Kevin Spencer

Security isn't horseshoes. Almost only counts in horseshoes and hand
grenades. Something is either secure or it is not. There is no such thing as
"sort of" secure. If the goal of this is to prevent printing of web
documents, it is a failure.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
P

Peter Morris

Security isn't horseshoes. Almost only counts in horseshoes and hand
grenades.

I have no idea what you are talking about.

Something is either secure or it is not. There is no such thing as
"sort of" secure. If the goal of this is to prevent printing of web
documents, it is a failure.

Indeed it is. It is not possible to stop people from printing, so I offered
a technique which would print a different webpage. There are many too ways
to print a webpage to be able to stop someone from doing it completely, but
does that mean I still shouldn't post? I don't think so.


--
Pete
====
Audio compression components, DIB graphics controls, FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com
 
A

Alan Z. Scharf

Because my client wants to do that, until I can convince him otherwise.

It is for use on a specific internal intranet application, not public
website.

Alan
 
A

Alan Z. Scharf

Because my client wants to do that, until I can convince him otherwise.

It is for use on a specific internal intranet application, not public
website.

Alan
 
S

someone

Why would you want to do this ? I would be very mad as hell if my system is
altered. I am as your client, I am the owner of my system. You are not
allowed without my consent to alter my system. As soon as I see such sites
doing these types of stuff, I would never come back. So, please do not do
it. If yours is so secret or highly valuable, then put it in the safe box,
do not publish it in the 1st place.

John
There are many cases that this might be necessary for legal and other
reasons. Just because you are looking at it on your system doesn't
mean you own the content. Make sure you read the fine print on most if
not all sites. You are highly restricted on what you can and cannot do
legally.
Peace,
Mike
 
S

Souri Challa

Alan,

One option is to open the required page as new window (
Window.ShowModalDialog ). You can disable the tool bar in this window.
You may also consider suppressing the content for printing. You can do this
on the client side using 'OnBeforePrint' ,'OnAfterPrint' events.

Let me know if you find any better options without having to use any third
party tools.

-Souri Challa
 
A

Alan Z. Scharf

Souri,

Thanks for your reply.

In what documentation could I get more info on this?

Regards,

Alan
 
W

WJ

someone said:
There are many cases that this might be necessary for legal and other
reasons. Just because you are looking at it on your system doesn't
mean you own the content. Make sure you read the fine print on most if
not all sites. You are highly restricted on what you can and cannot do
legally.
Peace,
Mike

I do not dispute or have any ? about web contents and I do not claim
anything on www as mine. However, My PC is mine, not the www.

John
 
W

w3Rm

Alan said:
*How can I disable the IE6 Print button and Ctrl-P for an ASP.Net
web
application?

Thanks.

Alan *


function disableCopyPastePrint() {
//write by w3Rm
if (((event.ctrlKey) && (parseInt(event.keyCode) == 67)) || //ctrl +
c
((event.ctrlKey) && (parseInt(event.keyCode) == 80)) || //ctrl + p
((event.ctrlKey) && (parseInt(event.keyCode) == 86))) { //ctrl + v
event.keyCode = 0;
event.returnValue = false;
return false;
}
}
document.onkeydown = disableCopyPastePrint;
 
Joined
Aug 17, 2008
Messages
1
Reaction score
0
So how do I print an unprintable web page without taking multiple screen shots?
Ctrl was disabled.
Print button is not present
Right Click is disabled

What should I do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,261
Messages
2,571,040
Members
48,769
Latest member
Clifft

Latest Threads

Top