Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

can I forbit printing of my .html?

Posted on 1999-01-18
7
Medium Priority
?
192 Views
Last Modified: 2010-04-09
i try hamp with writing instead of spaces some letters with background color. Thats work with IExplorer3, but not with Netscape, he print as see.
I found some media type PRINT, so:
 <STYLE type="text/css" media="print">
   H1 { font-size=0,font-color="some bgcolor" }
 </STYLE>
must prevent printing, but I filed to to.
0
Comment
Question by:Beast101598
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 4

Expert Comment

by:seguret
ID: 1845408
If you really want to forbid printing, it's impossible. Anybody can write a browser (I did it...) and print what's received.
0
 

Accepted Solution

by:
Glyn011499 earned 100 total points
ID: 1845409
Forbiding printing is impossible as of today. Although some tricks.....place a lot of spaces in your html code so the you have to scroll way down to view your source. Then go back to the top and type "Forbidden Access" in the upper left corner of the document. This will fool a lot of people who don't notice the scroll bar ......
0
 

Expert Comment

by:Mimic34
ID: 1845410
there are some random escape lines that printers may think that is what they are and stop printing.  i've had one problem with this, but anyone can load the page and then 'print screen' and do it that way.  there is really not much of a way to stop somebody from printing.  sorry.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Expert Comment

by:Mimic34
ID: 1845411
there are some random escape lines that printers may think that is what they are and stop printing.  i've had one problem with this, but anyone can load the page and then 'print screen' and do it that way.  there is really not much of a way to stop somebody from printing.  sorry.
0
 

Expert Comment

by:Mimic34
ID: 1845412
there are some random escape lines that printers may think that is what they are and stop printing.  i've had one problem with this, but anyone can load the page and then 'print screen' and do it that way.  there is really not much of a way to stop somebody from printing.  sorry.
0
 

Author Comment

by:Beast101598
ID: 1845413
i wan prevent normal (not expert) user from printing.
someone have heard about 'media descriptors'?

this from [HTML 4.0 Specification]:
HTML allows authors to design documents that take advantage of the characteristics of the media where the document is to be rendered (e.g., graphical displays, television screens, handheld devices, speech-based browsers, braille-based tactile devices, etc.). By specifying the media attribute, authors allow user agents to load and apply style sheets selectively. Please consult the list of recognized media descriptors.

The following sample declarations apply to H1 elements. When projected in a business meeting, all instances will be blue. When printed, all instances will be centered.
<HEAD>
 <STYLE type="text/css" media="projection">
    H1 { color: blue}
 </STYLE>

 <STYLE type="text/css" media="print">
   H1 { text-align: center }
 </STYLE>
if i change in [...media="print"...] font-size=1, font changed also in browser. What wrong?

fanx

excuse me for english...

to Mimic34: some printers sends graphics information as see, so these esc simbols will be missed . or not?
0
 
LVL 5

Expert Comment

by:pbhj
ID: 7595095
Alistapart : http://www.alistapart.com/stories/goingtoprint has some info on creating print style sheets.  

Also, re your specific question (even though it looks like a second question which isn't allowed ...!) about why the font changed.  Possibly the browser decides that as you've not set a browser specific style sheet that it should use the next nearest option, your print one (- just guessing, could be a browser bug).  Anyway, try specifiying, eg

<LINK rel="stylesheet" type="text/css" href="mystyle.css">

first (in the header, this is a link to a seperate style sheet saved as plain text with extension .css) so the browser has a default to work with.

Also, on the subject of the original question could you put a line in your print style sheet like:

div {display: none !important}

Which would tell the printed version to not display any divs.  All content would need to be in a div.  Again this could be circumvented by many methods but looks hot-to-trot to me.

pbhj

PS: Let us know if that last bit works for you.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

715 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