Re: How to print?



Hi, .-:Namarie:-., you can simply do fil=fopen("/dev/lp0","w") and then write
all the ASCII characters you want to print with
write(fil,message,strlen(message));
I suppose for USB ones you have to some more complicated things. May be driver
needed.

Bye.
Dragomir


Hi, group.

I'm a beginner on programming in Linux (as everyone has been, i hope ;)
and using GTK1.4 (I think!)

I haven't seen in GTK documentation (I've been looking a bit, but not a
lot) any way to print like sending to a file. I mean, imagine someone that
connects an old printer to the LPT, without "installing" it (just like old
MS-DOS printers). Can I send directly the characters to the lpt port? Like
<<write (lpt1, "hello\n");>>

(I wish it was any "dos-like" way to print something...

Don't know if it's a GTK call or a system call...

Thanks in advance and sorry if it's not where I've to ask this...

.-:Namarie:-.

p.s. another question, is there any way to write and read to/from USB like
doing it with files?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list







-----------------------------
АВТОРСКИ картички от Mail.bg
Календар на ВСИЧКИ празници
http://mail.bg/greetings/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]