output to printer
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
hi all please .. Can i print the output of program to the printer directly please tell me thank's all
#include main () { cout <<"Hi all .. That's Me"; return 0; }
-*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*
*if* your printer is connected to LPT1 you might be able to do the following:
ofstream printer; printer.open("LPT1"); printer << "Hello World!" << '\n';
And when your done streaming text to the printer you can try sending a control character of 0xC which was the old ASCII Form Feed[^] or (FF) character. Best Wishes, Randor (David Delaune)