[Gambas-user] Print directly to printer

Pablo Vera pvera at ...729...
Fri Oct 14 17:24:11 CEST 2005


The printer acts as a drawing area, so you can do something like this:

----------------------------------------------------------------
   Draw.Begin(Printer)

   Draw.Font.Name = "Arial"
   Draw.Font.Size = 80
   Draw.Text("Hello World", X1, Y1) ' Prints text @ (X1,Y1)

   Printer.NewPage                  ' Begins a new page

   Draw.Image(Ticket, X2, Y2)       ' Draws an image @ (X2,Y2)

   Draw.End                         ' Sends document to printer
----------------------------------------------------------------

I hope this helps.

Saludos,
Pablo Vera

Ignatius Syofian wrote:
> Hi, all
> 
> Can i have a sample of print directly to printer ?
> My application need print directly to printed invoice directly, without 
> preview screen.
> 
> sorry to ask, cause i  new in gambas (about 2 month)




More information about the User mailing list