[Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.

Benoît Minisini gambas at ...1...
Thu Sep 24 00:33:34 CEST 2009


> these are shell commands, cat and echo
> cat shows the contents of a file and echo print a string in screen
> we use redirection which is >
> to a device printer /dev/lp0 or lp1 or lp2 see what is your printer
> 
> To print a file you can write in shell or in gambas SHELL command the
>  command cat file > /dev/lp0
> 
> there must be a file with name "file" which contains what you want to print
> 
> or if you want to print a line straight use echo
> 
> if you type in a console echo "test" you see in console the word test,
> so you redirect this to printer lp0 with this command
> 
> echo "test" > /dev/lp0
> and you print it.
> 
> try them fisrt from a console and then use them with Gambas SHELL or EXEC
> 

In Gambas, you can use PRINT instead of running a shell to run "echo"!

-- 
Benoît Minisini




More information about the User mailing list