aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Disabling the print Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Disabling the print" Watch "Disabling the print" New topic
Author

Disabling the print

Nilesh Srivastava
Ranch Hand

Joined: Aug 29, 2003
Posts: 70
Hi All,
My requirement is to restrict the user from printing the web page through PRINT button functionality of browser.
Can anyone tell me how to do that.
My aim is to restrict the user from printing the page.There are certain wayz thru which a user can print :
1)Thru PRINT button of broswer
2)Ctrl+C Ctrl+V (I have clue to disable it)
3)Printscreen button of Keyboard(Can be done thru JavaScript)
4)Right Clicking(Can be disabled)
Is there any other way to print the web-page.
Please guide me.
Thanks in advance
Sim Raina
Ranch Hand

Joined: Nov 20, 2003
Posts: 33
to copy ============> ctrl insert
to delete============> shift delete
to paste =======> Shift insert


if u can't impress people with ur intelligence , confuse them with ur bullshit
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
I'm moving this to the HTML & Javascript forum. Please continue this disucssion there. Thank you


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Basically the page can be captured many ways from saving it, to copy and pasting, to print screen, to getting it from the temp files, to just writing it out on a piece of paper with a pen and pencil.
Can you block the print button?
try playing with this line of code, it might get your boss off of your back

Eric
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
it's useless to try and block printing. If someone really wants to do it, they will.
Brian


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
Nilesh Srivastava
Ranch Hand

Joined: Aug 29, 2003
Posts: 70
Thanks Eric,
It helped me in getting rid of my Boss.It really helped me.
But I still have a doubt.If we can trap the print event like this and fool the user,then the print button can also be trapped for no print and even if user click the print button , no out put will come.
Could u/anyone plz help me in this issue.
Thanks a lot to all of u
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You are basically stuck with that
Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disabling the print