... seria como se a "classe" Win_Prn() não fosse uma "Classe".
*************
function main
*************
local oPrinter, cPrinter := Win_PrinterGetDefault()
cls
? cPrinter
oPrinter := Win_Prn():New( cPrinter )
? hb_IsObject( oPrinter )
oPrinter := NIL
? hb_IsObject( oPrinter ...
Pesquisa resultou em 132 ocorrências: +win_PrinterGetDefault
Termo pesquisado: +win printergetdefault
- 13 Mar 2025 16:47
- Fórum: [x]Harbour
- Tópico: Sobre erro: Método não exportado: Win_Prn():NEW()
- Respostas: 7
- Exibições: 3956
- 04 Dez 2024 15:46
- Fórum: [x]Harbour
- Tópico: Converter Impressão Clipper -> Harbour
- Respostas: 4
- Exibições: 3998
Converter Impressão Clipper -> Harbour
... a impressão para um arquivo
SET PRINTER TO arquivo.txt
// código do relatório
// finalizar o relatório
SET PRINTER TO
// enviar para a impressora
win_PrintFileRaw(win_PrinterGetDefault(), "arquivo.txt")
// remover arquivo temporário
FErase("arquivo.txt")
Precisa incluir hbwin.hbc na compilação.
SET PRINTER TO arquivo.txt
// código do relatório
// finalizar o relatório
SET PRINTER TO
// enviar para a impressora
win_PrintFileRaw(win_PrinterGetDefault(), "arquivo.txt")
// remover arquivo temporário
FErase("arquivo.txt")
Precisa incluir hbwin.hbc na compilação.
- 26 Nov 2024 00:09
- Fórum: MiniGui
- Tópico: include\i_MsgBox.ch(20) Warning W0002 Redefinition or dupli
- Respostas: 59
- Exibições: 23723
include\i_MsgBox.ch(20) Warning W0002 Redefinition or dupli
... hb_SetCodepage()
hbmk2: Dica: Adicionar op‡Æo 'hbwin.hbc' faltando nas fun‡äes:
win_PrintFileRaw(), win_printerStatus(), win_Prn(),
win_printerGetDefault(), win_OEMToANSI(), wapi_MessageBox(),
wapi_DestroyMenu(), wapi_GetActiveWindow(), wapi_SetMenu(),
win_printerList(), win_ANSIToOEM ...
hbmk2: Dica: Adicionar op‡Æo 'hbwin.hbc' faltando nas fun‡äes:
win_PrintFileRaw(), win_printerStatus(), win_Prn(),
win_printerGetDefault(), win_OEMToANSI(), wapi_MessageBox(),
wapi_DestroyMenu(), wapi_GetActiveWindow(), wapi_SetMenu(),
win_printerList(), win_ANSIToOEM ...
- 07 Dez 2023 11:04
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: Ajustando sistema Hwgui(Win) para Hwgui(Linux).
- Respostas: 44
- Exibições: 43117
Ajustando sistema Hwgui(Win) para Hwgui(Linux).
... undefined reference to `HB_FUN_HWG_CLEARKEYBOARD'
/usr/bin/ld: .hbmk/linux/gcc/balcao.o:(.data.rel+0x5bb0): undefined reference to `HB_FUN_WIN_PRINTERGETDEFAULT'
/usr/bin/ld: .hbmk/linux/gcc/balcao.o:(.data.rel+0x6130): undefined reference to `HB_FUN_WIN_SHELLNOTIFYICON'
/usr/bin/ld: .hbmk/linux/gcc ...
/usr/bin/ld: .hbmk/linux/gcc/balcao.o:(.data.rel+0x5bb0): undefined reference to `HB_FUN_WIN_PRINTERGETDEFAULT'
/usr/bin/ld: .hbmk/linux/gcc/balcao.o:(.data.rel+0x6130): undefined reference to `HB_FUN_WIN_SHELLNOTIFYICON'
/usr/bin/ld: .hbmk/linux/gcc ...
- 06 Dez 2023 19:18
- Fórum: [x]Harbour
- Tópico: Convertendo Sistema do GASPRO para Harbour
- Respostas: 276
- Exibições: 373723
Convertendo Sistema do GASPRO para Harbour
... oPrn, aPrn:=WIN_PRINTERLIST(), n := 0
if empty(aPrn)
alert('Não há impressoras instaladas')
return .f.
endif
If cPrint == Nil
cPrint := win_PrinterGetDefault()
EndIf
oPrn := win_prn():New(cPrint)
oPrn : LandScape := .F.
oPrn : FormType := WIN_DMPAPER_A4
oPrn : Copies := 1
oPrn : CharSet(255 ...
if empty(aPrn)
alert('Não há impressoras instaladas')
return .f.
endif
If cPrint == Nil
cPrint := win_PrinterGetDefault()
EndIf
oPrn := win_prn():New(cPrint)
oPrn : LandScape := .F.
oPrn : FormType := WIN_DMPAPER_A4
oPrn : Copies := 1
oPrn : CharSet(255 ...
- 06 Dez 2023 17:26
- Fórum: [x]Harbour
- Tópico: Convertendo Sistema do GASPRO para Harbour
- Respostas: 276
- Exibições: 373723
Convertendo Sistema do GASPRO para Harbour
... Function Imprime(cArq,cPrint,cTit)
**********************************
*
*
Local oPrn, aPrn:=WIN_PRINTERLIST()
hb_default(@cPrint,win_PrinterGetDefault())
hb_default(@cTit,"PEDIDO")
If Empty(cArq)
alert('Informe algo p/ imprimir.')
Return .F.
EndIf
If empty(aPrn)
alert('Não há ...
**********************************
*
*
Local oPrn, aPrn:=WIN_PRINTERLIST()
hb_default(@cPrint,win_PrinterGetDefault())
hb_default(@cTit,"PEDIDO")
If Empty(cArq)
alert('Informe algo p/ imprimir.')
Return .F.
EndIf
If empty(aPrn)
alert('Não há ...
- 04 Jun 2023 15:47
- Fórum: Contribuições, Dicas e Tutoriais
- Tópico: PIX
- Respostas: 20
- Exibições: 7506
PIX
... CP1252"
VAR nDrawMode INIT PDFCLASS_DRAWMODE_ROWCOL
VAR lDrawZebrado INIT .F.
VAR cAppEmpresaNome INIT ""
VAR cDefaultPrinter INIT WIN_PRINTERGETDEFAULT()
METHOD AddPage()
METHOD RowToPDFRow( nValue )
METHOD ColToPDFCol( nValue )
METHOD MaxRow()
METHOD MaxCol()
METHOD Row( nAddRows ...
VAR nDrawMode INIT PDFCLASS_DRAWMODE_ROWCOL
VAR lDrawZebrado INIT .F.
VAR cAppEmpresaNome INIT ""
VAR cDefaultPrinter INIT WIN_PRINTERGETDEFAULT()
METHOD AddPage()
METHOD RowToPDFRow( nValue )
METHOD ColToPDFCol( nValue )
METHOD MaxRow()
METHOD MaxCol()
METHOD Row( nAddRows ...
- 07 Mar 2022 17:25
- Fórum: [x]Harbour
- Tópico: Impressora Label Printer - Linguagem TSPL
- Respostas: 10
- Exibições: 1736
Impressora Label Printer - Linguagem TSPL
... pctoledo.org/forum/viewtopic.php?f=4&t=18709
Leia esse tópico, pq tem provavelmente seu problema nele resolvido.
cDefaultPrinter := WIN_PRINTERGETDEFAULT()
WIN_PRINTFILERAW( cDefaultPrinter, Prnfile.txt )
mas esse não consigo dá erro, É segredo o erro ? cadê para a gente ver ...
Leia esse tópico, pq tem provavelmente seu problema nele resolvido.
cDefaultPrinter := WIN_PRINTERGETDEFAULT()
WIN_PRINTFILERAW( cDefaultPrinter, Prnfile.txt )
mas esse não consigo dá erro, É segredo o erro ? cadê para a gente ver ...
- 20 Out 2021 13:12
- Fórum: [x]Harbour
- Tópico: Classe não é destruida ?
- Respostas: 22
- Exibições: 3085
Classe não é destruida ?
... ATUALIZA_CREDITO_CLIENTE( CLIENTES_ID )
METHOD RECEBER_MOVIMENTO_BAIXA( )
PROTECTED:
VAR nFormato INIT 1
VAR cDefaultPrinter INIT WIN_PRINTERGETDEFAULT()
VAR cReportOption
VAR nPrinterType
VAR nCLIENTES_ID INIT 0
VAR dPERINI INIT M->DAT_HOJE-30
VAR dPERFIN INIT M->DAT_HOJE
VAR ...
METHOD RECEBER_MOVIMENTO_BAIXA( )
PROTECTED:
VAR nFormato INIT 1
VAR cDefaultPrinter INIT WIN_PRINTERGETDEFAULT()
VAR cReportOption
VAR nPrinterType
VAR nCLIENTES_ID INIT 0
VAR dPERINI INIT M->DAT_HOJE-30
VAR dPERFIN INIT M->DAT_HOJE
VAR ...
- 21 Abr 2021 22:51
- Fórum: [x]Harbour
- Tópico: Create Error..impressão.
- Respostas: 25
- Exibições: 4782
Create Error..impressão.
... aPrn:=WIN_PRINTERLIST(), n := 0
if empty(aPrn)
hwg_Msginfo('Não há impressoras instaladas')
return .f.
endif
If cPrint == Nil
cPrint := win_PrinterGetDefault()
EndIf
oPrn := win_prn():New(cPrint)
oPrn : LandScape := .F.
oPrn : FormType := WIN_DMPAPER_A4
oPrn : Copies := 1
oPrn : CharSet(255 ...
if empty(aPrn)
hwg_Msginfo('Não há impressoras instaladas')
return .f.
endif
If cPrint == Nil
cPrint := win_PrinterGetDefault()
EndIf
oPrn := win_prn():New(cPrint)
oPrn : LandScape := .F.
oPrn : FormType := WIN_DMPAPER_A4
oPrn : Copies := 1
oPrn : CharSet(255 ...
- 21 Abr 2021 18:59
- Fórum: [x]Harbour
- Tópico: Create Error..impressão.
- Respostas: 25
- Exibições: 4782
Create Error..impressão.
... Function Imprime(cArq,cPrint,cTit)
*----------------------------------*
Local oPrn, aPrn:=WIN_PRINTERLIST()
hb_default(@cPrint,win_PrinterGetDefault())
hb_default(@cTit,"PEDIDO")
If Empty(cArq)
alert('Informe algo p/ imprimir.')
Return .F.
EndIf
*
If empty(aPrn)
alert('Informe ...
*----------------------------------*
Local oPrn, aPrn:=WIN_PRINTERLIST()
hb_default(@cPrint,win_PrinterGetDefault())
hb_default(@cTit,"PEDIDO")
If Empty(cArq)
alert('Informe algo p/ imprimir.')
Return .F.
EndIf
*
If empty(aPrn)
alert('Informe ...
- 08 Abr 2021 14:13
- Fórum: [x]Harbour
- Tópico: impressão de PDF
- Respostas: 18
- Exibições: 4181
impressão de PDF
... mudo manualmente a impressora a ser impressa, ele continua tentando imprimir no Foxit.
Por favor, verifiquem se fiz algo errado:
cPrn := Win_PrinterGetDefault()
if at("EPSON",upper(cPrn))=0
cPrn="EPSON WF-2860 Series"
endif
IF !( EMPTY( cPrn ) )
wapi_ShellExecute( 0, "print",cNomePDF ...
Por favor, verifiquem se fiz algo errado:
cPrn := Win_PrinterGetDefault()
if at("EPSON",upper(cPrn))=0
cPrn="EPSON WF-2860 Series"
endif
IF !( EMPTY( cPrn ) )
wapi_ShellExecute( 0, "print",cNomePDF ...
- 13 Jan 2021 21:22
- Fórum: [x]Harbour
- Tópico: Erro HB_FUN aparece diversas vezes, como resolver ?
- Respostas: 25
- Exibições: 4925
Erro HB_FUN aparece diversas vezes, como resolver ?
... FUN_SECONDSSLEEP'
C:/Users/Ricardo/AppData/Local/Temp/hbmk_2g2v5c.dir/gasp40hb.o:gasp40hb.c:(.data+0x4150): undefined reference to `HB_FUN_WIN_PRINTERGETDEFAULT'
C:/Users/Ricardo/AppData/Local/Temp/hbmk_2g2v5c.dir/gasp40hb.o:gasp40hb.c:(.data+0x4190): undefined reference to `HB_FUN_PREPIMP'
C:/Users ...
C:/Users/Ricardo/AppData/Local/Temp/hbmk_2g2v5c.dir/gasp40hb.o:gasp40hb.c:(.data+0x4150): undefined reference to `HB_FUN_WIN_PRINTERGETDEFAULT'
C:/Users/Ricardo/AppData/Local/Temp/hbmk_2g2v5c.dir/gasp40hb.o:gasp40hb.c:(.data+0x4190): undefined reference to `HB_FUN_PREPIMP'
C:/Users ...
- 15 Dez 2020 10:04
- Fórum: [x]Harbour
- Tópico: impressão de PDF
- Respostas: 18
- Exibições: 4181
impressão de PDF
... eu escolher o local onde salvará o pdf.
Fiz a seguinte modificação na rotina, para tentar forçar a imprimir na impressora Epson:
cPrn := Win_PrinterGetDefault()
if at("EPSON",upper(cPrn))=0
cPrn="EPSON WF-2860 Series"
endif
Achei que isso resolveria, mas não resolveu. Ele continua tentando ...
Fiz a seguinte modificação na rotina, para tentar forçar a imprimir na impressora Epson:
cPrn := Win_PrinterGetDefault()
if at("EPSON",upper(cPrn))=0
cPrn="EPSON WF-2860 Series"
endif
Achei que isso resolveria, mas não resolveu. Ele continua tentando ...
- 02 Dez 2020 12:24
- Fórum: [x]Harbour
- Tópico: impressão de PDF
- Respostas: 18
- Exibições: 4181
impressão de PDF
Amiguinhos,
cjp
Veja que cPrn := Win_PrinterGetDefault() pega o nome da impressora padrão.
Basta colocar o nome da impressora como aparece na lista de impressoras do seu Windows, exemplo: cPrn := "Epson LX 310"
cjp
Veja que cPrn := Win_PrinterGetDefault() pega o nome da impressora padrão.
Basta colocar o nome da impressora como aparece na lista de impressoras do seu Windows, exemplo: cPrn := "Epson LX 310"