Bom dia,
Estou com um problema ao tentar imprimir QrCode na classe Fwmsprinter.
Tudo que vem após a impressão do Qrcode, é gerado no formato Qrcode também ao invés da impressão do texto. Alguém já teve esse problema?
Abaixo meu protótipo:
#INCLUDE “RPTDEF.CH”
#INCLUDE “FWPrintSetup.ch”
#INCLUDE “protheus.ch”
user function TestePdf()
Local oPrint
Local lContinua := .T.
RpcSetEnv("01","0101")
MV_PAR01 := "000000182"
MV_PAR02 := "1 "
MV_PAR03 := "501026"
MV_PAR04 := "01"
MV_PAR05 := "1234567890"
MV_PAR06 := "0987654321"
MV_PAR07 := 15.00
DbSelectArea("SD1")
SD1->(DbSetOrder(1))
SD1->(DbGoTop())
DbSelectArea("SA2")
SA2->(DbSetOrder(1))
SA2->(DbGoTop())
If SD1->(DbSeek(xFilial("SD1") + MV_PAR01 + MV_PAR02 + MV_PAR03 + MV_PAR04))
If SD1->D1_TIPO = "N"
SA2->(DbSeek(xFilial("SA2") + MV_PAR03 + MV_PAR04))
Else
lContinua := .F.
EndIf
oPrint := FWMSPrinter():New("Etiqueta"+Substr(Time(),1,2)+Substr(Time(),4,2)+Substr(Time(),7,2),6,.T.,,.T.,,,,,.T.,,.T.)
//oPrint:cFileName:= "Image"+Substr(Time(),1,2)+Substr(Time(),4,2)+Substr(Time(),7,2)
oPrint:SetPortrait()
oPrint:SetPaperSize(0,141,75)
oPrint:cPathPDF := GetTempPath()//"C:\temp\"
While SD1->(!EoF()) .And. SD1->(D1_DOC + D1_SERIE + D1_FORNECE + D1_LOJA) == MV_PAR01 + MV_PAR02 + MV_PAR03 + MV_PAR04 .And. lContinua
oPrint:StartPage()
oPrint:Say(240, 107, SD1->D1_DESCPRO) //Material
oPrint:Say(276, 130, SA2->A2_NOME) //Fornecedor
oPrint:Say(319, 055, Alltrim(MV_PAR01)+ "/" +Alltrim(MV_PAR02)) //NF
oPrint:Say(365, 055, MV_PAR05) //NR
oPrint:Say(408, 092, SD1->D1_FORNECE) //Codigo Fornecedor
oPrint:Say(448, 125, MV_PAR06) //Dimensão
oPrint:Say(488, 070, cValToChar(MV_PAR07)) //Quantidade
oPrint:QRCode(150,200,SD1->D1_COD, 50)
oPrint:EndPage()
SD1->(DbSkip())
End
oPrint:Preview()
EndIf
RpcClearEnv()
return