Disable Printing

Posted on 2004-11-09
Last Modified: 2010-04-06
Can you give me a vbscript code or something else to not allow the user to print the page content?

Please help me!!!
Question by:hukamha
    LVL 6

    Accepted Solution

    Its impossible dude. You cannot prevent it.
    LVL 53

    Assisted Solution

    Even if you could disable the print, you could not prevent them from using print screen because that is in firmware.  You also could not prevent them for using the cache version of the page.

    You could use a print specific style sheet that messes up the page for printing, but you still could not prevent them from printing by other means.  The technology is such that when your server responds to a requext, the page is down loaded.  It is on teh users computer; and they have absolute control of it.

    LVL 1

    Assisted Solution

    What you could do is look for another technology that won't print. We use to use Macromedia Flash - which wouldn't print. However, this is no longer the case. But their maybe a plugin technology available that wouldn't print the data. At any rate, a screen capture like alt-printscreen or Snagit will still be able to capture an image of the screen.
    LVL 8

    Expert Comment

    Not fool proof, but would work for the average, non-enlightened user:

    @media print {
          body {
                display: none;

    They could still copy and paste, and such, but better than nothing?
    LVL 2

    Expert Comment

    There is no way to disable this feature as already said, people can always resort to simply pressing print screen and then copying the image somewhere and pritning it. I would to have suggested Flash, but it seems even that will not solve your problem.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Preface In the first article: A Better Website Login System ( I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now