Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 22nd, 2003, 02:43 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
Preventing printing

Does anybody have any ideas on how I can prevent users from printing a web page? The best idea I've had so far is to use CSS to specify a style sheet that either prints white on white or simply hides all content for media="print". Any other ideas - even browser or platform specific is fine since 90+% of the users use IE on Windows.

A more difficult problem is stopping people from capturing the screen and using that to print. Any ideas for that?

Reply With Quote
  #2  
Old October 22nd, 2003, 02:53 PM
Jester Jester is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: England
Posts: 271 Jester User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Preventing printing

javascripts onBeforePrint might help with the first problem:

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onbeforeprint.asp

(although with the example there you would want to swap the onBeforePrint to hide divs, while the onAfterPrint shows them again).

I was hoping to be able to return false with the event handler to cancel the print - but couldn't see if it was possible - might be worth a try...

As to the screen grab - dunno :laugh:

Reply With Quote
  #3  
Old October 22nd, 2003, 02:54 PM
coderboi coderboi is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 80 coderboi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Preventing printing

CSS is probably your best way - try this:

Code:

<link rel="stylesheet"
href="noprint.css" type="text/css" media="print" />


and then in noprint.css have the following:

Code:
BODY {display:none;}


I've not tested this, but reckon it should work - let me know how you get on!

cheers


Reply With Quote
  #4  
Old October 22nd, 2003, 02:56 PM
coderboi coderboi is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 80 coderboi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Preventing printing

Also - just googled and found this commercial product that says it prevents screen grabs too.


http://www.artistscope.com/techniques.htm

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Preventing printing


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT