Solved

Printing From WebPage

Posted on 2002-07-24
6
210 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
  • 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now