DWA
asked on
How to print to a printer?Want to print out regular text.I am on a linux os
I am on a linux os and trying to figure out how one can print out regular text to my printer.
I thought I could do something like this but found out I can't
FILE *fp;
fp=fopen("/dev/usb/lp0", "w");
fprintf(fp,"hello");
fclose(fp);
Thanks for your time and help.
I thought I could do something like this but found out I can't
FILE *fp;
fp=fopen("/dev/usb/lp0", "w");
fprintf(fp,"hello");
fclose(fp);
Thanks for your time and help.
ASKER
Yeah I have found some stuff on a google search that suggested what you said but no luck.So far I have not found a good answer with a google search
Thanks for your time and reply
Thanks for your time and reply
ASKER
Let me try a search on stdprn
ASKER
I still have not found nothing that is worth a darn.
Here are a couple solutions...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_562c.asp
...but they look Microsoft Visual C++ or Windows-dependent.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to you all
if i want to print something on screen, i use
printf("%d",i);
if i want to print on printer, i use
fprintf(STDPRN,"%d",i);
so please findout something similar...