Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help, I just want to print a line....

Status
Not open for further replies.

Phil92

Programmer
Nov 23, 2001
17
FR
Hello,

On a dektop using W2000 Pro, I would like to print a single line on a line printer from my application without having a FF after.

This simple task can be done with :
echo "My message" >LPT1

But I would like to avoid having to launch the command subsystem everytime i print a line.

Any help is very welcome
Bye
 
Yes I could but it is local printing thru LPTx.

Here are the solutions that work :
- launch a batch file which contains
Echo %1 >LPT1
%1 is a parameter where there is the text to
be printed.
- Write a stream directly to the port (In C using fopen, fprint... functions).

Both of these solutions do not give me a good feedback if, for example, the printer is off line. That's why I am looking for a more professionel solution.

Any idea ?
Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top