[Gambas-user] Re: dumping text to printer

Benoit Minisini gambas at ...1...
Sat Nov 12 13:37:29 CET 2005


On Saturday 12 November 2005 01:43, alx jvr wrote:
> > hello! is there something in gambas similar to the ff. code in vb:
> >
> > open "lpt1" for output as #1
> > print #1, "whatever"
> > close #1
> >
> > .... that would print the word "whatever" directly to whatever
>
> printer is connected on the parallel port on linux?

On Linux, parallel ports are named /dev/lp0, /dev/lp1...

But you should never send data directly to these devices (most of the time, 
you didn't have the rights for doing that...).

You must use the printer sub-system. Nowadays, Linux use the CUPS system to 
manage printers.

You send data to the printer by using a command like 'lpr'.

You can use the kprinter program, if you use KDE. But then you get a KDE print 
configuration dialog, like what you got on Windows.

It depends on what you want to do exactly...

-- 
Benoit Minisini





More information about the User mailing list