Jump to content
Fivewin Brasil

Imprimindo Carnês na Matricial


evertonlb

Recommended Posts

Pessoal...

Já tenho tudo pronto no software em Clipper e queria aproveitar o código tal e qual tá funcionando..

Mas pelo jeito, e pelos testes que fiz ( o código a seguir ) não funciona!

Mas como faria pra funcionar?? Se eu pudesse só no Ctrl+C, Ctrl+V me pouparia um tempo substancial...

Tem um jeito de aproveitar os códigos de impressão de carnes e outras coisas que tenho e continuar imprimindo na matricial?

V_cImpCod := "1232"
V_cImpSeq := "6547387698"
*
set device to printer
set printer to cPCrn
setprc(0,0)
*
@ 00,00 say " "
@ 00,00 say chr( 14 )
@ 02,19 say "empresa de teste"
@ 02,45 say "segundo teste"
*
@ 10,06  say "0001"                 
@ 11,14  say val(V_cImpCod) 			   pict "99999"
@ 12,20  say val(left(V_cImpSeq,8))    pict "99999999"

set printer to
set device to screen

Link to comment
Share on other sites

Tente assim:



LOCAL cFile := "c:\abc\arquivo.txt"

@ 00,00 say " "
@ 00,00 say chr( 14 )
@ 02,19 say "empresa de teste"
@ 02,45 say "segundo teste"
*
@ 10,06 say "0001"
@ 11,14 say val(V_cImpCod) pict "99999"
@ 12,20 say val(left(V_cImpSeq,8)) pict "99999999"

set device to printer
SET PRINTER TO (cFile)

PrintFileRaw(GetDefaultPrinter(), cFile, "Teste com PrintFileRaw()")

SET PRINTER TO
set device to screen


Link to comment
Share on other sites

ou,




cPrinterName := GetDefaultPrinter()

ArqImp := "imp.txt"

SET PRINT ON
SET PRINTER TO &ArqImp
SET DEVICE TO PRINTER
SET CONSOLE OFF

// TEXTO...

SET CONSOLE ON
SET PRINTER OFF
SET PRINTER TO
SET DEVICE TO SCREEN

PrintFileRaw( cPrinterName, ArqImp, 'Teste de Impressao' )



Link to comment
Share on other sites

Pois é... mas mesmo que tenha USB eu compartilho e mandava pra LPT1... Clipper né amigo.. tem que viver de gambiarra!

tenho máquinas nos clientes com 3 paralelas...

Blz.. Obrigado pelas dicas.. vou testar uns códigos que peguei no forum!

Att.

Everton

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...