win_PrintFileRaw
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 ...
Pesquisa resultou em 273 ocorrências: +GetPrinters
Termo pesquisado: +getprinters
- 30 Jul 2025 14:39
- Fórum: [x]Harbour
- Tópico: Impressão em EPSON antigas no Harbour
- Respostas: 3
- Exibições: 4475
- 29 Jul 2025 17:10
- Fórum: [x]Harbour
- Tópico: Impressão em EPSON antigas no Harbour
- Respostas: 3
- Exibições: 4475
Impressão em EPSON antigas no Harbour
... a forma correta de imprimir diretamente pra impressora matricial no harbour ? Estou testando o seguinte código:
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 ...
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 ...
- 02 Dez 2023 10:02
- Fórum: [x]Harbour
- Tópico: Impressora RAW
- Respostas: 2
- Exibições: 828
Impressora RAW
Pessoal tem como saber se uma impressora aceita o arquivo no modo raw ?
No caso saber se é matricial.
GETPRINTERS(.t.) me da o nome, porta, mas nao consigo saber se é raw
No caso saber se é matricial.
GETPRINTERS(.t.) me da o nome, porta, mas nao consigo saber se é raw
- 03 Set 2023 09:39
- Fórum: [x]Harbour
- Tópico: Calculo de CPP (Caracteres por polegada)
- Respostas: 9
- Exibições: 1190
Calculo de CPP (Caracteres por polegada)
... hb_gtinfo( HB_GTI_FONTWIDTH, 36 )
para impressora
* Se nao informou a impressora no parametro pega a primeira da lista
if impressora=NIL
a=Getprinters()
impressora=a[1]
endif
oJob = win_prn():New(impressora)
oJob:Create()
oJob:Landscape:= .F.
oJob:SetPrintQuality(-1)
oJob:Copies:= 1
oJob ...
para impressora
* Se nao informou a impressora no parametro pega a primeira da lista
if impressora=NIL
a=Getprinters()
impressora=a[1]
endif
oJob = win_prn():New(impressora)
oJob:Create()
oJob:Landscape:= .F.
oJob:SetPrintQuality(-1)
oJob:Copies:= 1
oJob ...
- 07 Mar 2023 17:27
- Fórum: [x]Harbour
- Tópico: ERROR HBMK2
- Respostas: 18
- Exibições: 3002
ERROR HBMK2
... external '_HB_FUN_GETDEFAULTPRINTER' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_GETPRINTERS' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_CREATEOBJECT' referenced from X ...
Error: Unresolved external '_HB_FUN_GETPRINTERS' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_CREATEOBJECT' referenced from X ...
- 07 Mar 2023 14:34
- Fórum: [x]Harbour
- Tópico: ERROR HBMK2
- Respostas: 18
- Exibições: 3002
ERROR HBMK2
... external '_HB_FUN_GETDEFAULTPRINTER' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_GETPRINTERS' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_CREATEOBJECT' referenced from X ...
Error: Unresolved external '_HB_FUN_GETPRINTERS' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_CREATEOBJECT' referenced from X ...
- 07 Mar 2023 12:38
- Fórum: [x]Harbour
- Tópico: ERROR HBMK2
- Respostas: 18
- Exibições: 3002
ERROR HBMK2
... external '_HB_FUN_GETDEFAULTPRINTER' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_GETPRINTERS' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_CREATEOBJECT' referenced from X ...
Error: Unresolved external '_HB_FUN_GETPRINTERS' referenced from X:\XHARBOUR\CONTROLT\CT\CONTROLTSTD\OBJ\XHBIMPRESS.OBJ
Error: Unresolved external '_HB_FUN_CREATEOBJECT' referenced from X ...
- 01 Jul 2022 10:03
- Fórum: MiniGui
- Tópico: impressora bematech não fiscal
- Respostas: 5
- Exibições: 1234
impressora bematech não fiscal
... PrintWinPrn("Recibo.txt", IMPRESSORA)
// ou
// PrintWinPrn( cArq , IMPRESSORA)
Function PrintWinPrn( cArq, cPrint )
Local oPrn, aPrn := GetPrinters(), n := 0
oPrn := Win_Prn():New(cPrint)
oPrn :Copies := 1
oPrn :CharSet(155)
oPrn :SetFont( "Lucida Console", 8, { 3, -50 } )
*oPrn:SetFont ...
// ou
// PrintWinPrn( cArq , IMPRESSORA)
Function PrintWinPrn( cArq, cPrint )
Local oPrn, aPrn := GetPrinters(), n := 0
oPrn := Win_Prn():New(cPrint)
oPrn :Copies := 1
oPrn :CharSet(155)
oPrn :SetFont( "Lucida Console", 8, { 3, -50 } )
*oPrn:SetFont ...
- 15 Dez 2021 12:06
- Fórum: MiniGui
- Tópico: como imprimir em modo console ?
- Respostas: 8
- Exibições: 1774
como imprimir em modo console ?
... se esse exemplo ajuda:
Function Main()
Local aPrinters, cPrinter, nPrn
Local cFilePrint := "SeuArquivo.Txt"
Clear Screen
aPrinters := GetPrinters()
nPrn := AChoice( 12, 11, 16, 69, aPrinters, .T. )
If nPrn != 0
cPrinter := aPrinters[ nPrn ]
Hb_Alert( "Imprimir em:;;" + cPrinter ...
Function Main()
Local aPrinters, cPrinter, nPrn
Local cFilePrint := "SeuArquivo.Txt"
Clear Screen
aPrinters := GetPrinters()
nPrn := AChoice( 12, 11, 16, 69, aPrinters, .T. )
If nPrn != 0
cPrinter := aPrinters[ nPrn ]
Hb_Alert( "Imprimir em:;;" + cPrinter ...
- 07 Ago 2019 09:21
- Fórum: [x]Harbour
- Tópico: Não deixar formulário contínuo ejetar para próxima folha
- Respostas: 5
- Exibições: 1709
Não deixar formulário contínuo ejetar para próxima folha
... linhas.
Se você está compilando com o Harbour, seria interessante ver:
Clique nestas tag para ver os tópicos que discute sobre estas funções: GetPrinters PrintFileRaw GetDefaultPrinter
GetPrinters = cria uma array (matriz) com as impressoras instaladas no Windows
PrintFileRaw = imprime um ...
Se você está compilando com o Harbour, seria interessante ver:
Clique nestas tag para ver os tópicos que discute sobre estas funções: GetPrinters PrintFileRaw GetDefaultPrinter
GetPrinters = cria uma array (matriz) com as impressoras instaladas no Windows
PrintFileRaw = imprime um ...
- 11 Jul 2018 10:36
- Fórum: [x]Harbour
- Tópico: Win_PrintFileRaw() não funcionando
- Respostas: 6
- Exibições: 2581
Win_PrintFileRaw() não funcionando
... alguem sabe onde eu errei ?? quando mando no NODOSIMP mostra certo ...
FUNCTION SELECT_PRINT(cARQTXT)
LOCAL nPrn:=1
LOCAL aPrn:= GetPrinters()
SETMODE(25,80)
CLS
IF EMPTY(cARQTXT)
Alert("Obrigatorio informar o arquivo")
quit
ENDIF
IF EMPTY(aPrn)
aOptions := { "SIM", "NAO ...
FUNCTION SELECT_PRINT(cARQTXT)
LOCAL nPrn:=1
LOCAL aPrn:= GetPrinters()
SETMODE(25,80)
CLS
IF EMPTY(cARQTXT)
Alert("Obrigatorio informar o arquivo")
quit
ENDIF
IF EMPTY(aPrn)
aOptions := { "SIM", "NAO ...
- 04 Jun 2018 13:40
- Fórum: [x]Harbour
- Tópico: Impressora on-line / off-line
- Respostas: 12
- Exibições: 2261
Impressora on-line / off-line
... nenhuma impressora como padrao."
case GetPrintDefault()<>0
// Bloco que perfaz uma busca das impressoras instalados no sistema
//aPrinter := GetPrinters()
//for i = 1 to len(aPrinter)
// cPrinter := aPrinter[i]
// cPort := substr(cPrinter,at(",",cPrinter)+1,20)
// if MsgYesNO( "Colocar ...
case GetPrintDefault()<>0
// Bloco que perfaz uma busca das impressoras instalados no sistema
//aPrinter := GetPrinters()
//for i = 1 to len(aPrinter)
// cPrinter := aPrinter[i]
// cPort := substr(cPrinter,at(",",cPrinter)+1,20)
// if MsgYesNO( "Colocar ...
- 04 Jun 2018 12:32
- Fórum: [x]Harbour
- Tópico: Impressora on-line / off-line
- Respostas: 12
- Exibições: 2261
Impressora on-line / off-line
... cToolTip := OemToAnsi( "Verifique o Status da(s) Sua(s) Impressora(s) Inclusive Virtual" )
Function STATUS_DA_IMPRESSORA()
aArray := GetPrinters( .T. )
If Empty( aArray )
Alert( "Nenhuma impressora Instalada", "Atencao" )
Return Nil
Endif
for i = 1 to len(aArray)
cPrinterName ...
Function STATUS_DA_IMPRESSORA()
aArray := GetPrinters( .T. )
If Empty( aArray )
Alert( "Nenhuma impressora Instalada", "Atencao" )
Return Nil
Endif
for i = 1 to len(aArray)
cPrinterName ...
- 07 Mar 2018 09:09
- Fórum: [x]Harbour
- Tópico: IMPRESSÃO DIRETA PORTA USB em xHARBOUR
- Respostas: 14
- Exibições: 4046
IMPRESSÃO DIRETA PORTA USB em xHARBOUR
... Txt", "Impressao Teste" ) // imprime
EndIf
Return Nil
Func MyPrinters()
Local i, nPrn, oPrn, nMaxLen := 0, aPNomes := {}
Local aPrn := GetPrinters()
If Empty( aPrn )
Alert( "Nenhuma impressora Instalada" )
Return Nil
Endif
For i=1 To Len( aPrn )
AaDd( aPNomes , aPrn[i,1] )
nMaxLen ...
EndIf
Return Nil
Func MyPrinters()
Local i, nPrn, oPrn, nMaxLen := 0, aPNomes := {}
Local aPrn := GetPrinters()
If Empty( aPrn )
Alert( "Nenhuma impressora Instalada" )
Return Nil
Endif
For i=1 To Len( aPrn )
AaDd( aPNomes , aPrn[i,1] )
nMaxLen ...
- 01 Fev 2018 23:59
- Fórum: [x]Harbour
- Tópico: Imprime apenas 1 pagina
- Respostas: 14
- Exibições: 1854
Imprime apenas 1 pagina
... PrintWinPrn( PRELATO , aPrn[ nPrn ] )
Endif
EndDo
Clear Screen
eturn Nil
Function PrintWinPrn( cArq, cPrint )
Local oPrn, aPrn := GetPrinters(), n := 0
oPrn := Win_Prn():New(cPrint)
oPrn : LandScape := .F.
oPrn : FormType := FORM_A4
oPrn :Copies := 1
oPrn :CharSet(255)
oPrn ...
Endif
EndDo
Clear Screen
eturn Nil
Function PrintWinPrn( cArq, cPrint )
Local oPrn, aPrn := GetPrinters(), n := 0
oPrn := Win_Prn():New(cPrint)
oPrn : LandScape := .F.
oPrn : FormType := FORM_A4
oPrn :Copies := 1
oPrn :CharSet(255)
oPrn ...