Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling the print

 
Nilesh Srivastava
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to copy ============> ctrl insert
to delete============> shift delete
to paste =======> Shift insert
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to the HTML & Javascript forum. Please continue this disucssion there. Thank you
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's useless to try and block printing. If someone really wants to do it, they will.
Brian
 
Nilesh Srivastava
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are basically stuck with that
Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic