wmsoft Posted August 19, 2016 Report Share Posted August 19, 2016 Bom dia, Estou com uma pequena dificuldade, usando a classe TdosPrn fiz um teste e consigo executar normalmente a impressão normal e condensada, porem não consegui usar expandido. No Preview aparece vários caracteres especiais para expandido e não vai, vou postar como fiz os testes. cTxtFile := CurDrive()+":\"+GetCurDir()+"\TESTE.PRN" DEFINE FONT oFont2 NAME "SysTahoma" SIZE nil,-50 BOLD ITALIC oPrn := TDosPrn():New( cTxtFile, .T. ) //oPrn := TPrinter():New( cTxtFile, .T. ) oPrn:StartPage() //PRINT oPrn NAME "Testing the printer object from FiveWin" PREVIEW //nClrText := CLR_BLACK //oPrn:lZeraBfr:=.t. // Inibe o Pulo da Página //oPrn:ImpUSB:=.t. LINHA:= 1 oPrn:Command("15") oPrn:Say( LINHA++,00, "[COMPRIMIDO] TEXTO" ) //oPrn:Command("27","69") oPrn:Say( LINHA++, 00, CHR(14)+"[EXPANDIDO] TEXTO"+CHR(18) ) //oPrn:Say( LINHA++,00, chr(27)+chr(69)+ "[EXPANDIDO] TEXTO" ) oPrn:Command("27","18") oPrn:Say( LINHA++,00, "[NORMAL] TEXTO" ) oPrn:EndPage() oPrn:End() SetMTxtPreview( .f., 5, 2, .t., .f. ) TxtPreview( cTxtFile, cTitulo, .t. ,,,,,, .f. ) Qualquer ajuda é mais que bem vinda. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 19, 2016 Report Share Posted August 19, 2016 IF !EOF() IF BOF() /* // Clipper Puro oPrn:Say( LINHA, 01, ; CHR(27)+"H" + CHR(27)+"W"+CHR(0) + ; CHR(20) + CHR(18) + CHR(27)+"-"+CHR(0) + ; CHR(27)+"F" + CHR(27)+"5"+CHR(27)+"W"+CHR(0) + ; CHR(27)+"5"+CHR(27)+"-"+CHR(0) + ; CHR(27)+"5"+CHR(27)+"W"+CHR(0)+CHR(27)+"-"+CHR(0) + ; CHR(27)+"W"+CHR(0)+CHR(27)+"-"+CHR(0) + CHR(14) + ; MESSAGE ) */ @ LINHA,01 SAY CHR(27)+"H" + CHR(27)+"W"+CHR(0) + ; CHR(20) + CHR(18) + CHR(27)+"-"+CHR(0) + ; CHR(27)+"F" + CHR(27)+"5"+CHR(27)+"W"+CHR(0) + ; CHR(27)+"5"+CHR(27)+"-"+CHR(0) + ; CHR(27)+"5"+CHR(27)+"W"+CHR(0)+CHR(27)+"-"+CHR(0) + ; CHR(27)+"W"+CHR(0)+CHR(27)+"-"+CHR(0) + CHR(14) + ; MESSAGE OF oPrn LINHA:=LINHA+1 ELSE @ LINHA,01 SAY CHR(27)+"H" + CHR(27)+"W"+CHR(0) + ; CHR(20) + CHR(18) + CHR(27)+"-"+CHR(0) + ; CHR(27)+"F" + CHR(27)+"5"+CHR(27)+"W"+CHR(0) + ; CHR(27)+"5"+CHR(27)+"-"+CHR(0) + ; CHR(27)+"5"+CHR(27)+"W"+CHR(0)+CHR(27)+"-"+CHR(0) + ; CHR(27)+"W"+CHR(0)+CHR(27)+"-"+CHR(0) + ; MESSAGE OF oPrn LINHA:=LINHA+1 ENDIF ENDIF wmsoft 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 19, 2016 Report Share Posted August 19, 2016 http://forums.fivetechsupport.com/viewtopic.php?f=6&t=32832 Quote Link to comment Share on other sites More sharing options...
wmsoft Posted August 19, 2016 Author Report Share Posted August 19, 2016 Pelo que vi o problema está em usar o preview, o cliente precisa ver antes da impressão. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 19, 2016 Report Share Posted August 19, 2016 O que você quer imprimir? Se não for coisa de modo console, tipo CUPOM NÃO FISCAL, use a PRINTER.PRG ou RPREVIEW.PRG, exemplos no \samples. Veja: TESTPRN?.PRG Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.