PDA

View Full Version : making a webpage unprintable and undownloadable


aw56001
11-12-2004, 03:14 PM
Hello
I use Microsoft Frontpage but can use the html side of it. Is it possible to make a new page on my website that is unprintable and unsavable by anyone who reads that page on the web.
Please keep it simple.
Many Thanks
aw56001 :confused: :confused: :confused:

pb&j
11-12-2004, 03:19 PM
no, not possible.

liorean
11-12-2004, 03:37 PM
The closest you can get is to use a plug-in based technology such as PDF, Java or Flash instead of a web page. Web pages don't provide that kind of feature access rights controls.

aw56001
11-12-2004, 03:55 PM
Thanks for the information. I am new to this game so forgive my ignorance - is it possible to add a pdf, flash, Java plug-in to a normal Frontpage website or are pdf, flash, Java plug-ins incompatible with Frontpage. If not incompatible could I possibly find a free plug-in with an internet search. I have pdf viewer but don't have the facility to write to pdf files unless I subscribe.
Many Thanks
aw56001 :confused: :confused:

chilipie
11-12-2004, 04:48 PM
undownloadable

If it was undownloadable (is that a word :p ?) people wouldn't be able to see it.

If you want it to be unprintable, you could stop newbie users from printing directly from the page by putting:

<style type="text/css" media="print">
body { display: none }
</style>

Between the <head> tags.

aw56001
11-12-2004, 05:22 PM
Of course it has to be downloadable. Sorry, I meant to say unsavable i.e right clicking, and copying or selecting all, and saving everything to a Word file. Is it possible to prevent this as well as making it unprintable?
Thanks for the non-printing tip Chilipie :thumbsup: :thumbsup: , that's really useful to me.
Many Thanks
aw56001 :confused:

JamieR
11-12-2004, 05:53 PM
there is a way to stop the right hand click function in your browser, but there is a way to over ride this - like disabling javascript in your browser or selecting View > Source for the source code in IE.

the script is:
<script LANGUAGE="JavaScript1.1">
<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("YOUR MESSAGE HERE");
return false;
}
return true;
}

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// End -->

</script>
This disables the right hanc click function and displays a message in a pop up box - type your message where it says "YOUR MESSAGE HERE" in the above code.

Put this between your <body> </body> tags, but as I say, this can be over-ridden with other methods - but this does work to stop novice users from getting to the right hand click menu.
Also, I don't know if there is a way to make it unprintable via java, but the CSS code as posted before is your best bet.

-hope this helps.

aw56001
11-12-2004, 06:18 PM
Jamie and Chilipie, what can I say! Thanks a million for the tips - I'll try them out.
What a brilliant forum this is and what brilliant people who reply!
aw56001 :thumbsup: :thumbsup: :thumbsup: :thumbsup: :thumbsup:

chilipie
11-12-2004, 06:38 PM
The no-right click script generally pisses people off, but I suppose if you're fairly new to the web it might work.

oracleguy
11-12-2004, 07:02 PM
The no-right click script generally pisses people off, but I suppose if you're fairly new to the web it might work.

Yeah and they generally don't work in other browsers than IE. A secure PDF is probably your best bet for what your trying to do. But I believe generally, you have to use Adobe Acrobat to generate them, I'm not sure if there is any free alternatives.

The thing with this the web is that since the person has to download all your data to view it, nothing is secure from duplication.

gsnedders
11-12-2004, 07:33 PM
It works in Gecko browsers, but can be dispabled with display:config...

chilipie
11-12-2004, 09:24 PM
But I believe generally, you have to use Adobe Acrobat to generate them, I'm not sure if there is any free alternatives.


You can create .PDFs with Serif Page Plus. I've done it at school.

gsnedders
11-12-2004, 10:03 PM
You can create .PDFs with Serif Page Plus. I've done it at school.

My experiences with that arn't good....


You may want to change your sig so it's Mozilla :: Firefox :: Camino :: Safari :: Konqueror as Camino is part of the Mozilla project ;)

brothercake
11-12-2004, 10:08 PM
You've been given slightly bad advice here - you should not use no-right click scripts - because you'll be creating a serious accessibility problem. Right click does a lot more than "save as" - it's a vital part of the browsing toolset - and you should never presume to modify it or take it away.

If you're that worried about people taking your code, don't put it on the internet.

martin the 3rd
11-13-2004, 07:18 AM
Also, anyone who has any kind of experience with browsers can get around it, by going to veiw>source, or getting firefox and downloading the "override no right click scripts" plug-in.

And, even if you were to, say, make it in flash, if someone REALLLY wanted to print it, they could take screenshots....

-m3

chilipie
11-13-2004, 09:37 AM
If you're naive enough to think that you can protect your code, your code probably isn't worth protecting.

raf
11-13-2004, 10:33 AM
A secure PDF is probably your best bet for what your trying to do. But I believe generally, you have to use Adobe Acrobat to generate them, I'm not sure if there is any free alternatives.
The thing with this the web is that since the person has to download all your data to view it, nothing is secure from duplication.
I frequently dynamically generate PDF's with PHP that are then streamed to the browser. You can then set the permissions when the pdf is encrypted. So even if the client would duplicate them, they would need to be able to decrypt it before they can print it.

There are a lott of free classes to generate PDF's for PHP and probably some (free?) for ASP. There are even free html2pdf converters, but they aren't capable of converting everything (like nested tables, divs positioned over eachother etc).

JamieR
11-13-2004, 10:37 AM
there is a function on adobe's website where if you register for free, then you can create PDFs (i think the max is 20) from it.
www.adobe.com
However, Adobe Acrobat 6 Professional is best for encrypting and protecting PDFs - and (as already said) there is no free alternatives to it.

anyway, hope you find your answer.

raf
11-13-2004, 11:09 AM
However, Adobe Acrobat 6 Professional is best for encrypting and protecting PDFs - and (as already said) there is no free alternatives to it.
Where do you base that opinion on?

Why would a PDF that is generated with Adobe Acrobat 6 Professional be better encrypted and protected then one that i create with PHP? I'm quite sure that the same encoding-algoritme is used (otherwise the client wouldn't be able to open it).

Why wouldn't there be a free alternative? Generating and encoding them with for instance PHP is free. I think that using a serverside language to dynamically generate them is even a better sollution for the problem at hand. Even if you don't agree with that, it's still a free alternative...

JamieR
11-13-2004, 11:46 AM
well i am basing it on the differences between the free PDF creator on adobe.com vs. Acrobat - I don't know about creating them with PHP, as I have never done this, so I can't give a opinion on this.

brothercake
11-13-2004, 01:48 PM
You'll probably find that the free server-side libraries for PDF creation are not as high quality - visually - but I very much doubt there'll be any loss of data or compatibility issues.