[Gambas-user] lpt printer
nando
nando_f at ...951...
Thu Jan 31 02:54:41 CET 2008
Your printer is most likely /dev/lp0 or /dev/lp1.
Open it just like opening a file and PRINT or WRITE to it.
Same thing with serial printers /dev/ttyS0.
Same thing with USB->Serial converters to a serial printer /dev/ttyUSB0
-Fernando
---------- Original Message -----------
From: Leonardo Miliani <leonardo at ...1237...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Tue, 29 Jan 2008 17:31:21 +0100
Subject: Re: [Gambas-user] lpt printer
> gunartha ha scritto:
> > Hi Everybody,
> >
> > I have a question about printing data to lpt printer
> > If in VB6
> > Open "LPT1:" For Output As #1
> > Print #1, "NYOMAN GUNARTHA"
> > Close #1
> >
> > If in gambas how to direct printing to lpt printer like in VB6
> > and how to set paper (as bill paper) when end of data, the paper printer no scroll.
> >
> > I'm from Bali/Indonesia, I'm sorry about my english not good and may be this problem
had asked before
> >
> > Thank you very much
> >
> > Regards
> > Nyoman Gunartha
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
> You could print something directly to the printer by using the console.
> Try something like this:
> PUBLIC SUB Printing()
> DIM hProcess AS Process
>
> hProcess = SHELL "lpr " & some_text_to_print_in_a_string & " &"
> END
>
> Or, maybe, use Printer object (must use gb.qt component) to create a PS
> document and then print it.
>
> PUBLIC SUB Printing()
> DIM hProcess AS Process
>
> Printer.Copies = 1
> Printer.Name = ""
> Printer.File = Application.Path & "/name_of_file.ps"
> Draw.Begin(Printer)
> Draw.Foreground = Color.Black
> Draw.Font.Size = 10
> Draw.Text ("Some text to print", 500,500,1000,100, Align.Left)
> Draw.End
> hProcess = SHELL ("lpr " & Application.Path & "/name_of_file.ps" & " &")
> END
>
> --
> Ciao.
> Leo.
>
> Web: www.leonardomiliani.com
> E-mail: leonardo at ...1237...
>
> Co-fondatore di Gambas-it.org: www.gambas-it.org
> (il sito italiano dedicato alla comunità di Gambas)
>
> Scegli software opensource - Choose opensource software
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------
More information about the User
mailing list