Uso a impressão desta forma:
Código: Selecionar todos
#include "windows.ch"
#include "guilib.ch"
#include "common.ch"
#include "paths.ch"
#include "Inkey.ch"
static oPrinter, oFont, nLinha, nPagina
function Relatorio()
Local nImpresso:=0
INIT PRINTER oPrinter
IF oPrinter == Nil
return nil
ENDIF
oFont := oPrinter:AddFont( "Times New Roman",5 )
oPrinter:SetMode( 1 )
oPrinter:StartDoc( .T. )
nPagina:=0
oBmp := HBitmap():addfile( "logo.bmp", NIL ) // oBmp := HBitmap():addfile( "logo.jpg", NIL )
oPrinter:StartPage()
oPrinter:SetFont( oFont )
oPrinter:Bitmap( 5,5,40,50,, oBmp )
nPagina++
oPrinter:Say( "Logo", 6,5.5,200,30,,oFontUsina )
oPrinter:Say( transform( nPagina,"@e 9,999"), 190,5.5,179,132,,oFont4 )
oPrinter:Say( "Documentos",95,10,250,132,,oFontTitulo )
indiferente utilizando bmp ou jpg



