FUNCTION ImpLetras(aSelec2,nOpArm,lMeter)
LOCAL oPrn
LOCAL nRowStep, nColStep
LOCAL nRow := 0, nCol := 0
lMeter := IF(lMeter=NIL, .T., lMeter )
printersetup()
SET INDEX TO INITECAN
IF lMeter
oMeter:nTotal:=LEN(aSelec2)
ENDIF
// PrnSetSize( 2100, 1200 ) To adjust a different printer paper size!
PRINT oPrn NAME AtzNameSys PREVIEW
DEFINE FONT oFontTit NAME "ARIAL" SIZE 0, -12 BOLD OF oPrn
DEFINE FONT oFontDat NAME "LUCIDA CONSOLE" SIZE 0, -13 OF oPrn
FOR iConc=1 TO LEN(aSelec2) // Loop de todos los cantos seleccionados
SELECT BASEREAL
SEEK aSelec2[iConc,1]
aBMP := {}
aBMP = DAMENOTAS( LETRA, .T., nOpArm ) // Busca una serie de imagenes relacionadas al campo memo
nRow := 0
nCol := 0
nRowStep = oPrn:nVertRes() / 60
nColStep = oPrn:nHorzRes() / 96 // 96
PAGE // Inicio de Pagina
mLetra := LETRA //Campo memo
nRow+=(nRowStep*2)
* Impresion Titulo Principal
cTit1 := "SISTEMA PRINCIPAL" // Encabezado
oPrn:Say(nRow, nColStep* ( 48-( LEN( ALLTRIM(cTit1) ) /2 )), cTit1, oFontTit)
nRow+=(nRowStep*2)
* Impresion Subtitulo
cCanto := C_ITEM+") "+ALLTRIM(NOMBRE) // Subencabezado
oPrn:Say(nRow, 150, OemToAnsi(cCanto), oFontTit)
nRow+=(nRowStep*1)
* Impresion Subtitulo
IF !EMPTY(AUTOR)
cAutor := "("+ALLTRIM(AUTOR)+")" // Subencabezado
oPrn:Say(nRow, 150, OemToAnsi(cAutor), oFontTit)
nRow+=(nRowStep*1)
ENDIF
nRow+=(nRowStep*1)
* Impresion de CAMPO MEMO
mLetra := LETRA
FOR iLinea=1 TO MLCOUNT(mLetra)
* Linea=ALLTRIM(MEMOLINE(mLetra,,iLinea))
Linea=MEMOLINE(mLetra,,iLinea)
oPrn:Say(nRow, 150, OemToAnsi(Linea), oFontDat)
nRow+=nRowStep
NEXT
* Impresion
IF LEN(aBMP)>0
nRow := 0
nCol := 0
nRowStep = oPrn:nVertRes() / 50
nColStep = oPrn:nHorzRes() / 96
nRow+=nRowStep
// Mediadas de imagen
IF nOpArm=1 // Guitarra
n1 := IF( lLasser, 300, 250 ) // 250 Altura de imagen ¡
n2 := IF( lLasser, 250, 200 ) // 200 Largo de imagen ->
ELSE
n1 := IF( lLasser, 400, 300 ) // 250 Altura de imagen ¡
n2 := IF( lLasser, 450, 350 )// 200 Largo de imagen ->
ENDIF
// Ubicacion de imagen
// Dos columnas
nLugar1 := IF( lLasser, 3500, 1750 )
nLugar2 := IF( lLasser, 4200, 2200 )
// Una comumna
nLugar3 := IF( lLasser, 3500, 1950 )
IF LEN(aBMP)>6
FOR i := 1 TO 6
nRow+=(nRowStep*5) // 250
oPrn:SayBitmap( nRow, nLugar1, aBMP[i], n2, n1, 2 )
NEXT
nRow := 0
nCol := 0
nRowStep = oPrn:nVertRes() / 50 // We want 20 rows
nColStep = oPrn:nHorzRes() / 96 // We want 15 cols
nRow+=nRowStep
FOR i := 7 TO LEN(aBMP)
nRow+=(nRowStep*5)
oPrn:SayBitmap( nRow, nLugar2, aBMP[i], n2, n1, 2 ) //
NEXT
ELSE
FOR i := 1 TO LEN(aBMP)
nRow+=(nRowStep*5)
oPrn:SayBitmap( nRow, nLugar3, aBMP[i], n2, n1, 2 )
NEXT
ENDIF
ENDIF
ENDPAGE
IF lMeter
oMeter:Set( nAvanza++ )
SYSREFRESH()
ENDIF
NEXT
ENDPRINT
oFontTit:End()
oFontDat:End()
IF lMeter
oMeter:SET(0)
oMeter:REFRESH()
ENDIF
RETURN nil