You are on page 1of 1

ombre, puede que funcione con algo tal como...

Código:

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 

Aunque evidentemente hay una clase que implementa el uso de la impresora en GamBas, busca Printer
en la ayuda para más información: 

This is class is used for printing. 


In Gambas the Printer object is a graphic device, so you use the methods of the Draw class to output to
it. 
For example: 
Código:

 IF Printer.Setup() THEN RETURN 

 Draw.Begin(Printer) ' Initializes the draw 


 Draw.Text(TextArea1.Text, 200, 200) ' Prints the contents of a  TextArea in the upper left hand corner 
 Printer.NewPage ' Prints a new page 
 Draw.Foreground = Color.Red 
 Draw.Rectangle(500, 200, 32, 32) ' Draws a small red rectangle 
 Draw.End ' Then send page to the printer 

You might also like