Author |
Topic  |
|
whisky
New User
Netherlands
0 Posts |
Posted - 22 Mar 2007 : 23:06:46
|
Hi, I am a complete beginner, so kiss. I want a visitor of my website to be able to print a text document (an application form) by pushing a button or clicking a hotspot. The document is available at my site and should be printed on the printer of the visitor. Does anyone know how to fix this. Maybe I have to use a Java script, but I don't know how to incorporate it in my site and how should the script look like ? Thanks [2 ??:-|] |
|
T00N
Super User
    
573 Posts |
Posted - 22 Mar 2007 : 23:29:13
|
Why not make the file in word and put it as a doc file on your server. Then when the visitor clicks on the link to the file it will open as a word doc and from there they can print it. |
 |
|
s.dav
Site Admin
    
Italy
3364 Posts |
Posted - 23 Mar 2007 : 09:30:49
|
You can print the HTML page by launching a javascript function like "window.print()" or "document.print()" I can't remember, it's also possible to invoke a direct print on a PDF document but you must include the Acrobat engine OCX into your page.
I suggest you to use the Toon's method or mine. |
Regards, Davide |
 |
|
Jan van Londen
Super User
    
Netherlands
208 Posts |
Posted - 23 Mar 2007 : 22:29:54
|
Hello Gentlemen,
I made a little list and put it on-line: http://test.vanlonden.org/PrintIsNotScreen.html
It is a page with a list within an Iframe. If you look at the code you can see that there's one button, in the code it looks like this: <INPUT type=submit value="Print" id=btnXXXXX ACCESSKEY="X" style="width: 8em; height: 1.8 em" name=submit tabindex=3 title="Print the whole list" onclick="window.print();return false;">
The fun part of it is: the list in the Iframe is not the same as the one that's printed using the button, you can try that. Also by using the Filemenu, Printexample. In this case it's the use of stylesheet items to cause that. (The stylesheet is embedded in the header of the code, not in a separate css-file.) Using "@media screen" for the style of the items on screen, and "@media print" for the style of the items to be printed, you can make difference between shown and printed page. Perhaps, it is something for Whisky.
It brings me to an other question for Davide. For making sites with a lot of text, it would be nice if a textstyle could be defined for the whole project with DHE and used in the text-lable editor. Now I have to choose fonts, sizes, colours etc. over and over again. It would be nice if you could define a plaintextsyle, headerstyle etc. to be used on more pages within a project when using DHE.
Bye, Londen. |
Bye, Londen. |
Edited by - Jan van Londen on 23 Mar 2007 22:44:58 |
 |
|
s.dav
Site Admin
    
Italy
3364 Posts |
Posted - 24 Mar 2007 : 18:48:49
|
Yes, you are right, this feature is in my list from a some months ;-) |
Regards, Davide |
 |
|
|
Topic  |
|