[Web4lib] Non-printable pages?

Jonathan Gorman jtgorman at uiuc.edu
Thu Jun 22 14:25:12 EDT 2006


On Thu, 22 Jun 2006, Jim Brucker wrote:

> I'm creating a tutorial and I'd like to keep it simple and use html. 
> Unfortunately, I was recently told that people should not be able to print 
> the pages.
> Should I try using a print css to control print output, or is 
> there another way to render a page unprintable?  I know that someone could 
> simply cut/paste the code or even take a screen shot, but I'm not too worried 
> about making it *absolutely* unprintable.  If there is no simple solution, 
> though, I'll probably just create the pages in Flash.

You could use CSS, but you're right in that it isn't going to be a very 
effective block.

Try something like:
<link rel="stylesheet" href="print.css" type="text/css" media="print" />

having print.css with one line:

body {display:none}.

I can't help but to think though that if there is some sort of security or 
privacy concern here another approach should be taken.  It's a bit bizarre 
and counter-intuitive to have a non-printable tutorial.  I can only guess 
that it's due to some sort of documentation of proprietary functions and 
as such should have better security mechanisms.  Of course, I really don't 
know of any system off hand that would allow a document to be viewed but 
not printed.  (Acrobat might have something, but then I wouldn't be 
surprised to find a "non-conforming" viewer that could print it.)

Jon Gorman


More information about the Web4lib mailing list