Página 1 de 1

Impressão em EPSON antigas no Harbour

Enviado: 29 Jul 2025 17:10
por marco.prodata
Caros, qual a forma correta de imprimir diretamente pra impressora matricial no harbour ? Estou testando o seguinte código:

Código: Selecionar todos

Function Main
clear 
Aprn = GetPrinters(.t.)
prin := {}
for i = 1 to len(aprn)
    aadd(prin,aprn[i,1])
next 

op = Achoice(5,5,08,60,prin)

clear
@ 5,5 say aprn[op,1]
@ 5,30 say aprn[op,2]

Set Device To Print
Set Print On
Set Print To (aprn[op,1])

@ 1,1 say 'Teste de Impressao'
@ 4,1 say 'Linha 1'

Set Print Off
Set Device To Screen
Set Print To
 
Return .t.

Esse mesmo código funciona no xHarbour.

Impressão em EPSON antigas no Harbour

Enviado: 30 Jul 2025 10:38
por Mario Mesquita
Bom dia a todos.

Marcos, esse código não está fuincionando no Harbour? Faz tempo que não uso mais Epsons matriciais, mas acho que desse jeito funciona sim. Mas só posso cravar procurando algo daquele tempo.

Saudações,
Mario.

Impressão em EPSON antigas no Harbour

Enviado: 30 Jul 2025 12:38
por marco.prodata
Não funciona, dá o seguinte erro:

"Error TERM/2014 Create error: EPSON LX-300+II ESC/P (DOS Error 3) "

Impressão em EPSON antigas no Harbour

Enviado: 30 Jul 2025 14:39
por Ana Mitoooo
win_PrintFileRaw

Código: Selecionar todos

Function Main
clear 
sFile := 'c:\temp\file_to_print.prn'
Aprn = GetPrinters(.t.)
prin := {}
for i = 1 to len(aprn)
    aadd(prin,aprn[i,1])
next 

op = Achoice(5,5,08,60,prin)

clear
@ 5,5 say aprn[op,1]
@ 5,30 say aprn[op,2]

Set Device To Print
Set Print On
Set Print To sFile

@ 1,1 say 'Teste de Impressao'
@ 4,1 say 'Linha 1'

Set Print Off
Set Device To Screen
Set Print To

win_PrintFileRaw( aprn[op,1], sFile, 'Harbour win_PrintFileRaw' )

Return .t.