Solved

Printing From WebPage

Posted on 2002-07-24
6
209 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
Comment Utility
0
 
LVL 1

Accepted Solution

by:
eclipsed2k earned 200 total points
Comment Utility
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 10

Expert Comment

by:KenAdney
Comment Utility
Or more directly:

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

Expert Comment

by:eclipsed2k
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Powershell output to HTML 1 28
CKEditor - will not function 7 30
Library to convert HTML to PDF. 8 44
Change month dropdown 5 15
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

9 Experts available now in Live!

Get 1:1 Help Now