IMPRESION CON TPRINTER EN EPSON TM-T20II

IMPRESION CON TPRINTER EN EPSON TM-T20II

Postby LuisPonce » Fri Jan 18, 2019 5:21 am

Buenas noches

Tengo inconvenientes al imprimir en rollo en una impresora térmica; en mi laboratorio sale perfecto, pero donde el cliente no imprime correctamente.


nAnchoT=48 // en el caso de imp. termica, matricial =40

Code: Select all  Expand view
          PRINT oPrnTicket NAME "Impresion" TO "TMT20II" // PREVIEW

              IF Empty( oPrnTicket:hDC )
                 Return Nil
              ELSE
                 oPrnTicket:SetSize(800, 5080)     //(3.15"x2.54)x100 = 800.1 mm (20"*2.54)*100=5080 mm
                 oPrnTicket:SetPortrait()
             ENDIF

              DEFINE FONT oFntArial1 NAME "DRAFT 12CPI" SIZE 0, -8 OF oPrnTicket
              DEFINE FONT oFntArial2 NAME "Arial" SIZE 0, -12 OF oPrnTicket
              DEFINE FONT oFntArial3 NAME "Courier New" SIZE 0, -10 OF oPrnTicket
              DEFINE FONT oFntArial4 NAME "Arial" SIZE 0, -12 BOLD OF oPrnTicket

           PAGE

            StepRow := oPrnTicket:nVertRes() / 130
            StepCol := oPrnTicket:nHorzRes() / nAnchoT

            oPrnTicket:Say( StepRow*nRow, StepCol*0, Repl("-",nAnchoT) )
             nRow++

            oPrnTicket:Say( StepRow*nRow, StepCol*11, TRIM(cDesDoc), oFntArial4) //,,,,2 )
             nRow++
            oPrnTicket:Say( StepRow*nRow, StepCol*0, PADC("ELECTRONICA",nAnchoT), oFntArial4) //,,,,2 )
             nRow:=nRow+2

            oPrnTicket:Say( StepRow*nRow, StepCol*0, PADR("Numero: "+cNro,nAnchoT) )
            oPrnTicket:Say( StepRow*nRow, StepCol*0, PADL("Fecha: "+CFECHA(dFecAct,'E'),nAnchoT) )
             nRow++
 
            oPrnTicket:Say( StepRow*nRow, StepCol*0, Repl("-",nAnchoT) )
             nRow++

            oPrnTicket:Say( StepRow*nRow,StepCol*0, TRANS((AliasLq)->CANTIDAD,MA53)+" "+cItmUnd+" "+cItmDes )
            oPrnTicket:Say( StepRow*nRow,StepCol*0, PADL(TRANS((AliasLq)->IMPORTE,MA72C),nAnchoT) )
             nRow++

             .....
             .....
             .....

            ENDPAGE

        ENDPRINT

 


Imprime correctamente y bien presentado...pero cuando lo llevo al cliente;

- en un caso: Las lineas con el font oFntArial4 son las únicas legibles, el resto tipo pulga ilegible
- en otro caso: las letras salen correctamente, pero el ancho que se define en 48 (por ser térmica) se reduce a 42 truncando el final de las lineas

Los dos casos tienen la misma impresora que la que yo tengo, EPSON TM-T20II y están instaladas como tal con sus drivers (no Generic/Text)

Alguien sabe por que sucede esto?

Saludos

Att. Luis Ponce
Luis Ponce
User avatar
LuisPonce
 
Posts: 192
Joined: Tue Jul 01, 2008 6:34 pm
Location: PERU

Re: IMPRESION CON TPRINTER EN EPSON TM-T20II

Postby jbrita » Fri Jan 18, 2019 12:08 pm

Hola, yo imprimo pasajes de bus asi:

oPrn:=PrintBegin("Impresión de documentos",.F.,lPrv,cPrn,.T.)


DEFINE FONT aFon1 NAME "Times New Roman" SIZE 0,12 OF oPrn
DEFINE FONT aFon2 NAME "COURIER NEW" SIZE 0,14 BOLD OF oPrn
DEFINE FONT aFon3 NAME "Times New Roman" SIZE 0,12 BOLD OF oPrn
DEFINE FONT aFon4 NAME "Times New Roman" SIZE 0,10 OF oPrn
DEFINE FONT aFon5 NAME "Times New Roman" SIZE 0,16 bold OF oPrn
DEFINE FONT aFon6 NAME "Times New Roman" SIZE 0,24 bold OF oPrn

PageBegin()

aDes:=oPrn:Cmtr2Pix(0.1,1.50) //posiciones, en donde va a comenzar la imagen a mostrar
aHas:=oPrn:Cmtr2Pix(5.24,1.2) //ancho,largo
oImage:=TImage():Define(,cLogo)
oPrn:SayImage(aDes[1],aDes[2],oImage,aHas[1],aHas[2])



oPrn:Cmsay(2.0,.2,"ANDENES: ",aFon2)

oPrn:Cmsay(3.0,.2,"Origen : "+Origen,aFon5)
oPrn:Cmsay(3.5,.2,"Destino : "+Destino,afon5)

oPrn:Cmsay(4.5,.2,"Fecha : "+Vec_Dia[dow(ctod(fechasalida))]+ " "+FechaSalida,afon5)

* oPrn:Cmsay(5.0,.2,"Hora : "+Am_Pm(AllTrim(HoraSalida)),afon5)

oPrn:Cmsay(5.0,.2,"Hora : "+Horarios(AllTrim(HoraSalida)),afon5)
oPrn:Cmsay(5.5,.2,"Asiento : ",afon5)
oPrn:Cmsay(5.5,2.8,Str(aSiento,2),afon6)

oPrn:Cmsay(6.0,.2,"Subida : "+AllTrim(nSubida),afon5)

oPrn:Cmsay(7.2,.2,"Valor Total: $ "+Str(Valor),afon5)

oPrn:Cmsay(8.0,.2,"Nro. Boleto : "+Str(oPasaje),afon5)
oPrn:Cmsay(8.5,.2,"Nro. Reserva : "+Str(oReserva),afon5)
oPrn:Cmsay(9.0,.2,"Forma de Pago : "+Alltrim(TPago),afon5)
oPrn:Cmsay(9.5,.2,"Vendedor : "+Alltrim(aNomUsuario),afon5)

oPrn:Cmsay(10.5,.2,"Nota: este boleto es valido para la fecha y hora señalada",afon4)
oPrn:Cmsay(10.8,.2,"la devolucion y/o cambio se aceptara hasta 4 horas antes ",afon4)
oPrn:Cmsay(11.1,.2,"de inicio del servicio. Si cancelo en efectivo se devolvera",afon4)
oPrn:Cmsay(11.4,.2,"el 85% (Art. 67 d.s. 212 / 92 MT).Si el valor del equipaje",afon4)
oPrn:Cmsay(11.7,.2,"excede de las 5 UTM es su obligacion declarar previamente ",afon4)
oPrn:Cmsay(12.0,.2,"en la oficina de origen (Art. 70 D.S. 212 / 92 MT). Los ",afon4)

* oPrn:Cmsay(14.1,.2,"La Empresa se reserva el derecho a cambiar el numero de",afon4)
* oPrn:Cmsay(14.4,.2,"asiento por razones de fuerza mayor.",afon4)

oPrn:Cmsay(14.1,.2,"",afon4) //14.7

*0.7

oPrn:Cmsay(15.5,2.2,"INSPECTOR",afon2)
// 16.0
oPrn:Cmsay(16.5,.2,"Fecha : "+Vec_Dia[dow(ctod(fechasalida))]+ " "+FechaSalida,afon5)
oPrn:Cmsay(17.0,.2,"Origen : "+Origen,afon5)
oPrn:Cmsay(17.5,.2,"Destino : "+Destino,afon5)
oPrn:Cmsay(18.0,.2,"Hora : "+Horarios(Alltrim(HoraSalida)),afon5)
oPrn:Cmsay(18.5,.2,"Asiento : "+Str(aSiento,2),afon5)
oPrn:Cmsay(19.0,.2,"Nro. Boleto : "+Str(oPasaje),afon5)
oPrn:Cmsay(19.5,.2,"Nro. Reserva : "+Str(oReserva),afon5)
oPrn:Cmsay(20.0,.2,"Forma de Pago : "+Alltrim(tPago),afon5)
oPrn:Cmsay(20.5,.2,"Vendedor : "+Alltrim(aNomUsuario),afon5)
// 21.0
// 21.5
oPrn:Cmsay(22.0,.2,"Valor Total: $ "+Str(valor),afon5)
// 22.5
oPrn:Cmsay(23.0,.2,"------------------------------------------------------------",afon3)
oPrn:Cmsay(23.5,2.2,"B U S ",afon2)
// 24.0
oPrn:Cmsay(24.5,.2,"Fecha : "+Vec_Dia[dow(ctod(fechasalida))]+ " "+FechaSalida,afon5)
oPrn:Cmsay(25.0,.2,"Origen : "+Origen,afon5)
oPrn:Cmsay(25.5,.2,"Destino : "+Destino,afon5)
oPrn:Cmsay(26.0,.2,"Hora : "+horarios(Alltrim(HoraSalida)),afon5)
oPrn:Cmsay(26.5,.2,"Asiento : "+Str(aSiento,2),afon5)
oPrn:Cmsay(27.0,.2,"Nro. Boleto : "+Str(oPasaje),afon5)
oPrn:Cmsay(27.5,.2,"Nro. Reserva : "+Str(oReserva),afon5)
oPrn:Cmsay(28.0,.2,"Valor Total: $ "+Str(valor),afon5)
oPrn:Cmsay(28.5,.2,"------------------------------------------------------------",afon3)
oPrn:Cmsay(29.0,2.2,"AGENCIA",afon2)
oPrn:Cmsay(29.5,0.2,"Fecha : "+Vec_Dia[dow(ctod(fechasalida))]+ " "+FechaSalida,afon5)
// 30.0
oPrn:Cmsay(30.5,0.2,"Origen : "+Origen,afon5)
oPrn:Cmsay(31.0,0.2,"Destino : "+Destino,afon5)
oPrn:Cmsay(31.5,0.2,"Hora : "+Horarios(Alltrim(HoraSalida)),afon5)
oPrn:Cmsay(32.0,0.2,"Asiento : "+Str(aSiento,2),afon5)
oPrn:Cmsay(32.5,0.2,"Nro. Boleto : "+Str(oPasaje),afon5)
oPrn:Cmsay(33.0,0.2,"Nro. Reserva : "+Str(oReserva),afon5)
oPrn:Cmsay(33.5,0.2,"Forma de Pago : "+Alltrim(tPago),afon5)
oPrn:Cmsay(34.0,0.2,"Vendedor : "+Alltrim(aNomUsuario),afon5)
oPrn:Cmsay(34.5,0.2,"Valor Total: $ "+Str(valor),afon5)
oPrn:Cmsay(35.0,.2,"------------------------------------------------------------",afon3)



PageEnd()

aFon1:End()
aFon2:End()
aFon3:End()
aFon4:End()
aFon5:End()
aFon6:End()

PrintEnd()
jbrita
 
Posts: 486
Joined: Mon Jan 16, 2006 3:42 pm

Re: IMPRESION CON TPRINTER EN EPSON TM-T20II

Postby armando.lagunas » Fri Jan 18, 2019 5:30 pm

hola,

tuve mismo problema, mi solución fue instalar las mismas fuentes de letras.

confirma que tu cliente tenga las mismas.

en tu caso esta :

Code: Select all  Expand view

  DEFINE FONT oFntArial1 NAME "DRAFT 12CPI" SIZE 0, -8 OF oPrnTicket                      <-- esta
              DEFINE FONT oFntArial2 NAME "Arial" SIZE 0, -12 OF oPrnTicket
              DEFINE FONT oFntArial3 NAME "Courier New" SIZE 0, -10 OF oPrnTicket
              DEFINE FONT oFntArial4 NAME "Arial" SIZE 0, -12 BOLD OF oPrnTicket

 
SkyPe: armando.lagunas@hotmail.com
Mail: armando.lagunas@gmail.com
User avatar
armando.lagunas
 
Posts: 346
Joined: Mon Oct 05, 2009 3:35 pm
Location: Curico-Chile

Re: IMPRESION CON TPRINTER EN EPSON TM-T20II

Postby LuisPonce » Sat Jan 19, 2019 6:20 am

Gracias por sus respuestas

A parte de variar el tamaño de las fuentes, también veo que se achica el ancho

Para matricial 40 espacios de ancho y para térmica 48 espacios, pero veo que también éste se achicó a 42 :shock:

Jbrita, Armando

Lo pruebo y comento

Att.

Luis Ponce
Luis Ponce
User avatar
LuisPonce
 
Posts: 192
Joined: Tue Jul 01, 2008 6:34 pm
Location: PERU


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests