Hello i'm trying to write e c program that works on DOS, how can i write to printer (LPT1) with a similar command like "printf"?
Is it possible?
Thank you.
Hello i'm trying to write e c program that works on DOS, how can i write to printer (LPT1) with a similar command like "printf"?
Is it possible?
Thank you.
may be you should try to use file streams
stream = fopen( "LPT1", "tw" );
fprintf( stream, "%s","This is a PrintTest" );
etc.
I did not try it but it should works. :-)
it works, I've just tried it and it does, if you want to see a working code, download the file
but, you could also create a file which contains what you wanna print, and then call the DOS command
type myfile.txt > PRN
and then erase the file
It should work, but I have'nt tried it yet
Oskilian
Thank you for your time it works perfectly for my needs!!