Jump to content
Fivewin Brasil

Problema com tdosprn e preview


wmsoft

Recommended Posts

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.

Link to comment
Share on other sites


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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...