• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Disabling the print

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
to copy ============> ctrl insert
to delete============> shift delete
to paste =======> Shift insert
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this to the HTML & Javascript forum. Please continue this disucssion there. Thank you
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are basically stuck with that
Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic