Solved

Printing From WebPage

Posted on 2002-07-24
6
214 Views
Last Modified: 2013-12-16
Hie Guys,

I have a question...

"How can i send text directly from my webpage to the client's default printer...be it through jscript or otherwise."

I am looking for a way to do this please help...even a web reference...will suffice

0
Comment
Question by:agexxiii
[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
  • 4
6 Comments
 
LVL 1

Expert Comment

by:eclipsed2k
ID: 7174926
0
 
LVL 1

Accepted Solution

by:
eclipsed2k earned 200 total points
ID: 7174945
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7174977
Any of those scripts is fine but, you have to have the users permission.  

window.print will give you the same functionality as the print from teh browser menu, or the print button.  You cannot control which printer it goes to.  That is under the user's control. It has to be you do not even know if the printer is turned on , or if the user is even connected to a printer.

Cd&
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 10

Expert Comment

by:KenAdney
ID: 7174979
Or more directly:

<a href="Javascript:window.print();">Click here to print.</a>
0
 
LVL 1

Expert Comment

by:eclipsed2k
ID: 7175069
I am not sure what colbol means by having users permission but there is something you might want to think about when using Javascripts to print a page.

If the user has java script disabled then the script will not work and thus no printing will take place and if this is a concern for you then what I would suggest is using the ctrl+p command and it does the same thing as the above scrpts and it works with or without javascript enabled.

So my suggestion is to put on your page this line.

"To print this page press "ctrl+p"


just a thought and once again good luck.
0
 
LVL 1

Expert Comment

by:eclipsed2k
ID: 7175192
Rereading colbols comment I think I understand what he is saying and he is correct. If you just want to allow users to print the contents of your page then the above scripts and commands will do just fine howerver if you want it so that when a user enters your page it just starts printing without any user interaction then to the best of knowledge it cannot be done. Even using activeX and or vbscript requires "some" user interaction.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding a countdown to HTA 12 115
Anyone familiar with PhotoSwipe? 3 42
Table doesn't show the lines! 3 36
send html form with multipe immages as buttons 2 37
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 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