jfaguiar Posted February 11, 2016 Report Share Posted February 11, 2016 Bom Amigos. Tenho um sistema em FW+xHarbour 13.02 num cliente com essa bendita impressora e simplesmente a impressão sai com as letras maiores, mesmo estando a qualidade de impressão em padrão. Nesse caso trata-se de um pedido de compras com bexes etc, onde tive que reduzir os fontes pra dar certo. E então, teremos que programar para as demais impressoras e alterar o sistema para a Epson L365? Ronaldbuch 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 11, 2016 Report Share Posted February 11, 2016 Mostre o fonte. Quote Link to comment Share on other sites More sharing options...
evertonlb Posted February 11, 2016 Report Share Posted February 11, 2016 Olha brother.. Se serve de alento tô numa situação mais complicada que isso. Não consegui fazer os relatórios serem impressos corretamente em diversas impressoras... Tenho uma Multifuncional Samsung e nela os relatório ficam uma beleza, mas em qualquer outra impressora a coisa fica feia... Já tentei algumas coisas que peguei em dicas e no fórum mesmo, mas até agora nada funcionou a contento. Felizmente dos quatro únicos clientes que estão usando softwares em FW, 3 tem impressoras Samsung. O outro, o que não tem Samsung, só está vendo os relatórios no vídeo até eu não arrumar essa bronca... Ajudar não ajudei. Essa foi só para você não se sentir sozinho! hahahahahahah Att. Everton jfaguiar and kapiaba 2 Quote Link to comment Share on other sites More sharing options...
kleyber Posted February 11, 2016 Report Share Posted February 11, 2016 jfaguiar, Estás usando o que para gerar essa impressão? TPrinter, TDosprn... Quote Link to comment Share on other sites More sharing options...
jfaguiar Posted February 12, 2016 Author Report Share Posted February 12, 2016 Bom dia galera, segue a rotina: STATIC FUNCTION IMPPEDI() LOCAL nVALDESC := nVALORC - nTOTLIQ,nTOTIPI := 0 LOCAL nVIA := 1,nITEM,cNAMEPRN := UPPER( PrnGetName() ) LOCAL cLOGO := IF("ARQSCDX2" $ cPATH,"LogoRoltranPrn.Bmp","LogoRoltranPrn.Bmp") #Define CLR_HBLUE nRGB(202, 255, 255,0,0,0) #Define CLR_AMARELO nRGB(255, 255, 174,0,0,0) #Define CLR_BLACK nRGB(0,0,0,0,0,0) PRIVATE oPrn,oFont,nTam, nLen, nTamPag, nTamRel,aCOL,nPROW // aTXTCONDPG[1,1] := TRIM(cNOMFOR)+ " ("+STRZERO(ARQCAD->PEDCLI,5)+")" aTXTCONDPG[2,1] := "CNPJ: "+ARQFOR->FORCGC+" I.E.: "+ARQFOR->FORIEST aTXTCONDPG[3,1] := "Endereço: "+TRIM(cENDER1) IF ARQCAD->PEDCLI # 1 aTXTCONDPG[4,1] := "Bairro: "+TRIM(ARQFOR->FORBAIR) + " - Cidade: "+TRIM(ARQFOR->FORCID) +" - "+ARQFOR->FORUF+" - CEP: "+ARQFOR->FORCEP ELSE aTXTCONDPG[4,1] := "Bairro: "+TRIM(cBAIRRO) + " - Cidade: "+TRIM(cCIDADE) ENDIF aTXTCONDPG[5,1] := "Contato: "+TRIM(ARQCAD->PEDVEND) +" - e-Mail "+ARQCAD->PEDEMAIL aTXTCONDPG[6,1] := "Telefone : "+TRIM(ARQCAD->PEDFONE) // DbSelectArea("TMPDETAL") SET FILTER TO PEDQTDE # 0.00 // DbGoTop() PRINT oPrn NAME "Orc"+LTRIM(STR(ARQCAD->PEDORC)) FROM USER PREVIEW MODAL IF "PDF" $ UPPER( PrnGetName() ) ENDPRINT PRINT oPrn NAME "Orc"+LTRIM(STR(ARQCAD->PEDORC)) ENDIF nITEM := 0 DEFINE FONT oFont07 NAME "ARIAL" SIZE 22,07 OF OPRN DEFINE FONT oFont08 NAME "ARIAL" SIZE 22,08 OF OPRN DEFINE FONT oFont NAME "ARIAL" SIZE 27,10 OF OPRN DEFINE FONT oFont10N NAME "ARIAL" SIZE 27,10 BOLD OF OPRN DEFINE FONT oFont12N NAME "ARIAL" SIZE 36,12 BOLD OF OPRN DEFINE FONT oFont12 NAME "ARIAL" SIZE 40,12 OF OPRN DEFINE FONT oFONTCB1 NAME "ARIAL" SIZE 52,-10 BOLD OF OPRN DEFINE PEN oPen WIDTH 2 OF oPrn Define Pen oPen1 style PS_DOT Width 1 Color CLR_HGRAY Of oPrn DEFINE PEN oPen2 WIDTH 12 COLOR CLR_AMARELO OF oPrn DEFINE PEN oPen3 WIDTH 6 COLOR CLR_BLACK OF oPrn oPrn:SetPage(9) // 1=Carta 9=A4 oPrn:SetLandscape() // Paisagem ResLinha := oPrn:nLogPixely()/2.54 ResColuna := oPrn:nLogPixelx()/2.54 // PAGE WHILE !EOF() //MyBox(1.00,00.80,05.00,28.50) // Ret grande superior //oPrn:CmSay(01.6,01.0,VEMPRES) // Li Ci oPrn:SayBitMap( 0.80 * ResLinha, 0.50 * ResColuna,; "&cDRIVE\SISCOM\BITMAPS\LogoRoltranPrn2.bmp",; 9.00 * ResLinha, 02.30 * ResColuna ) // largura altura // nPROW := 3.8 oPrn:CmSay(nPROW,01.0,"PEDIDO DE COMPRA:"+ LTRIM(STR(ARQCAD->PEDORC,6)) ) oPrn:CmSay(nPROW,14.0,"Data: "+NOVADATA(ARQCAD->PEDDEMI)) // oPrn:SetFont(oFont) MyBox(4.40,00.80,07.8,15.0) // Retângulo do cliente MyBox(4.40,15.00,07.8,28.5) // Retângulo da condição de pagamento // oPrn:CmSay(04.51,00.9,"Dados do Fornecedor") oPrn:CmSay(04.51,15.2,"Condição de Pagamento") VARAUX1 := 4.53 FOR n := 1 TO LEN(aTXTCONDPG) VARAUX1 += 0.4 oPrn:CmSay(VARAUX1,00.9,aTXTCONDPG[n,1],oFONT07) oPrn:CmSay(VARAUX1,15.2,aTXTCONDPG[n,2],oFONT07 ) NEXT oPrn:CmSay(4.53+0.4,22.0,"Prazo de Entraga: "+ARQCAD->PEDPRAZ,oFONT07 ) oPrn:CmSay(4.53+1.2,22.0,"Frete.: "+ARQCAD->PEDFRETE,oFont07) // nPROW := 8.0 MyBox(nPROW,00.80,nPROW+0.5,03.50,"Código",oFont08,PAD_LEFT) MyBox(nPROW,03.50,nPROW+0.5,14.00,"Descrição dos Produtos",oFont08,PAD_LEFT) MyBox(nPROW,14.00,nPROW+0.5,16.00,"NCM",oFont08,PAD_LEFT) MyBox(nPROW,16.00,nPROW+0.5,17.80," Quant",oFont08,PAD_RIGHT) MyBox(nPROW,17.80,nPROW+0.5,18.80,"Unid",oFont08,PAD_LEFT) MyBox(nPROW,18.80,nPROW+0.5,21.50,"Preço Unit",oFont08,PAD_RIGHT) MyBox(nPROW,21.50,nPROW+0.5,24.20," Total Item",oFont08,PAD_RIGHT) MyBox(nPROW,24.20,nPROW+0.5,25.60,"%ICMS",oFont08,PAD_LEFT) MyBox(nPROW,25.60,nPROW+0.5,28.50,"% IPI",oFont08,PAD_LEFT) //oPrn:SetFont(oFont) nPROW += 0.60 nLRP := 4 WHILE PEDORC = ARQCAD->PEDORC .AND. !EOF() ++ nITEM nPUNIT := TMPDETAL->PEDVAL // CHKDESC( TMPDETAL->PEDVAL,ARQCAD->PEDDESC) oPrn:CmSay(nPROW,00.90,PEDPROD,oFont08,,,,PAD_LEFT) oPrn:CmSay(nPROW,03.60,PEDNPROD,oFont08) oPrn:CmSay(nPROW,14.10,PEDCLASF,oFont08) oPrn:CmSay(nPROW,17.70,TRANS(PEDQTDE,"999999.99"),oFont08,,,,PAD_RIGHT) oPrn:CmSay(nPROW,18.00,PEDUNID,oFont08 ) oPrn:CmSay(nPROW,21.40,TRANSF(nPUNIT,"@E 999,999.99"),oFont08,,,,PAD_RIGHT ) oPrn:CmSay(nPROW,24.10,TRANSF(PEDQTDE * nPUNIT ,"@E 9,999,999.99"),oFont08,,,,PAD_RIGHT ) oPrn:CmSay(nPROW,24.50,STR(PEDICMS,2),oFont08 ) oPrn:CmSay(nPROW,25.50,STR(PEDIPI,2),oFont08 ) DbSkip() //IF PEDORC = ARQCAD->PEDORC nPROW += 0.4 LH(nPROW-0.1,0.80,28.3,12,oPen1) //ENDIF ENDDO //nPROW += 0.5 IF !EMPTY(ARQCAD->PEDDESC) oPrn:CmSay(nPROW,15,"VALOR BRUTO R$:" ) oPrn:CmSay(nPROW,24.10,TRANSF(nVALORC,"@E 9,999,999.99"),oFont08,,,,PAD_RIGHT ) // nPROW += 0.5 VARAUX1 := IF( ARQCAD->PEDDESC > 0.00,"Acréscimo ","Desconto ")+"R$:" oPrn:CmSay(nPROW,15,VARAUX1 ) oPrn:CmSay(nPROW,24.10,TRANSF( ABS(nVALDESC),"@E 9,999,999.99"),oFont08,,,,PAD_RIGHT ) // nPROW += 0.5 LH(nPROW-0.1,0.50,20.5,12,oPen1) oPrn:CmSay(nPROW,15,"TOTAL GERAL R$:" ) oPrn:CmSay(nPROW,24.10,TRANSF(nVALORC-nVALDESC,"@E 9,999,999.99"),oFont08,,,,PAD_RIGHT ) ELSE oPrn:CmSay(nPROW,15,"TOTAL GERAL R$:" ) oPrn:CmSay(nPROW,24.10,TRANSF(nVALORC-nVALDESC,"@E 9,999,999.99"),oFont08,,,,PAD_RIGHT ) ENDIF // nPROW += 0.5 //cOBS := "Observações: " + TRIM(cOBS1) + CRLF + cOBS2 + CRLF + cOBS3 cOBS := "Observações: " + TRIM(ARQCAD->PEDOBS1) // + CRLF + cOBS2 + CRLF + cOBS3 nLINMEMO := MLCOUNT(cOBS,99) FOR I = 1 TO nLINMEMO nPROW += 0.5 oPrn:CmSay(nPROW,1.0,MEMOLINE(cOBS,99,i) ) NEXT ENDDO ENDPAGE ENDPRINT SET FILTER TO RETURN nil ***************************************************************************** FUNCTION MyBox(nLinI,nColI,nLinF,nColF,cTITULO,oFONT,PADSEL,cCONTEUDO) // 1º 2º 3º 4º 5º 6º 7º 8º // // Oitavo parâmetro de mybox escrito em 15/06/2011 na techlix as 10:23 // LOCAL nCOL := nColI,nPROWI := nLinI DEFAULT PADSEL := 0 IF PADSEL = 1 // PAD_RIGHT nCOL := nColF - 0.1 ELSE nCOL := nColI + 0.1 ENDIF IF nLinF > 0.00 oPrn:Cmtr2Pix(@nLinI, @nColI) oPrn:cmtr2Pix(@nLinF, @nColF) oPrn:Box(nLinI, nColI, nLinF, nColF, oPen ) ENDIF IF cTITULO # Nil IF VALTYPE(cTITULO) == "C" oPrn:CmSay(nPROWI+0.1,nCOL,cTITULO,oFONT,,,,PADSEL) ELSE // Array oPrn:CmSay(nPROWI-0.1,nCOL,cTITULO[1],oFONT,,,,PADSEL) oPrn:CmSay(nPROWI+0.1,nCOL,cTITULO[2],oFONT,,,,PADSEL) ENDIF ENDIF IF cCONTEUDO # Nil oPrn:CmSay(nPROW+0.5,nCOL,cCONTEUDO,oFONT,,,,PADSEL) ENDIF RETURN Nil *************************************************************************** Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 12, 2016 Report Share Posted February 12, 2016 nRowStep = oPrn:nVertRes() / 20 // We want 20 rows nColStep = oPrn:nHorzRes() / 15 // We want 15 cols ou, // fonte indicada: DEFINE FONT oFont NAME "Courier New" SIZE 0, -10 OF oPrn nRowStep = oPrn:nVertRes() / 40 nColStep = oPrn:nHorzRes() / 40 // We want 15 cols // ex: oPrn:Say( nRowStep * nColStep, 1, MemoLine( cText,, n + 1 ), oFont ) procure por oPrn:nVertRes() // como imprimir em qualquer impressora. evertonlb 1 Quote Link to comment Share on other sites More sharing options...
jfaguiar Posted February 15, 2016 Author Report Share Posted February 15, 2016 hôôô menino danido ! rsrsrs vou testar kapiaba. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 15, 2016 Report Share Posted February 15, 2016 hôôô menino danido ! rsrsrs vou testar kapiaka kkkkkk, gostei do <kapiaka>, vou criar outro <nick>. kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 15, 2016 Report Share Posted February 15, 2016 Não ligue para o Nome da Função... kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk Exemplo simples: /*constante de tprinter*/ #define PAD_LEFT 0 #define PAD_RIGHT 1 #define PAD_CENTER 2 #define DMPAPER_USER 256 FUNCTION IMPRIME_ANIMAIS( oLbx, DbClientes, DbAnimais, DbEspecies ) LOCAL ResColuna, ResLinha, cAlias, nCodVende, nNewCodVende, oPrn, oFont, ; oFontLogo, oFontDivi, oFontList, oFontCurs, oPen1, oPen2, oPen3, ; oFontSubl, nLinha, nColuna, nPagina cAlias := ALIAS() // ANIMAIS.DBF //-> Mostra o Relatorio... Preview do Relatorio do animal PRINT oPrn NAME "FICHA DE IDENTIFICAÇÃO DO ANIMAL" PREVIEW MODAL IF EMPTY( oPrn:hDC ) RETURN NIL // Printer was not installed or ready ENDIF DEFINE FONT oFont NAME "Courier New" SIZE 0, -8 OF oPrn DEFINE FONT oFontDivi NAME "Courier New" SIZE 0, -12 BOLD OF oPrn DEFINE FONT oFontCurs NAME "Courier New" SIZE 0, -14 BOLD OF oPrn DEFINE FONT oFontSubl NAME "Courier New" SIZE 0, -16 BOLD UnderLine OF oPrn //-> Problemas com o Windows XP - Formato da FONTE Nao Reconhecido IF IsWinNT() .OR. IsWin2000() // Para Windows XP/NT e 2000 / 2003 DEFINE FONT oFontLogo NAME "Courier New" SIZE 0, -16 BOLD OF oPrn DEFINE FONT oFontList NAME "Courier New" SIZE 0, -20 BOLD OF oPrn ELSE //-> 95/98/ME DEFINE FONT oFontLogo NAME "Courier New" SIZE 0, -20 BOLD OF oPrn DEFINE FONT oFontList NAME "Courier New" SIZE 0, -22 BOLD OF oPrn ENDIF //-> Caneta do Preview DEFINE PEN oPen1 WIDTH 4 COLOR CLR_BROWN OF oPrn DEFINE PEN oPen2 WIDTH 2 COLOR CLR_BROWN OF oPrn DEFINE PEN oPen3 WIDTH 5 COLOR CLR_BLACK OF oPrn oPrn:SetPage(9) //-> A4 //9 oPrn:SetPortrait() //-> Vertical(Retrato) //- Como Imprimir em Centimetros sem errar e em qualquer Impressora //- By Giovanny Vechi ResLinha := oPrn:nVertRes() / 40 ResLinha := oPrn:nLogPixely() / 2.54 ResColuna := oPrn:nLogPixelx() / 2.54 nPagina := 1 PAGE nLinha := 0.50 nColuna := 10.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "FICHA DE IDENTIFICAÇÃO DO ANIMAL", oFontDivi,, ; CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 //-> Data de Hoje oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Nome: " + ( cAlias)->NOMEANIMAL, oFont,, ; CLR_BLACK,, PAD_LEFT ) nColuna := 11.00 //-> Sexo oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Sexo: "+ IIF( ( cAlias)->SEXO = [M], "MACHO", "FEMEA" ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nColuna := 17.50 //-> Cadastro registrado oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Registrado: " + TRANSF( ( cAlias)->DTCADASTRO, "@D 99/99/9999" ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 //Identificacao oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Identificação: " + ( cAlias)->COR, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 8.00 // Data de Nascimento oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Nasc.: " + TRANSF( ( cAlias)->DATA_NASCI, "@D 99/99/9999" ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nColuna := 14.50 // Idade oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Idade: " + ( cAlias)->IDADE, oFont,, ; CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 // Especie oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Espécie: " + (cAlias)->ESPECIE, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 10.00 // Raca oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Raça: " + (cAlias)->RACA, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 15.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Peso: " + STR( (cAlias)->PESO ) + " Kg", oFont,, ; CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Vacinas: " + SUBST( ( cAlias)->VACINAS, 1, 101), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( ( cAlias)->VACINAS, 102, 207 ), oFont,, ; CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Tosa: " + ( cAlias)->TOSA, oFont,, CLR_BLACK,, PAD_CENTER ) nColuna := 3.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Pedigree: " + ( cAlias)->PEDIGREE, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 5.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Doador: " + ( cAlias)->DOADOR, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 7.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Cardiaco: " + ( cAlias)->CARDIACO, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 9.30 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Adestrado: " + ( cAlias)->ADESTRADO, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 12.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Agressivo: " + ( cAlias)->AGRESSIVO, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 14.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Hipetativo: " + ( cAlias)->HIPERATIVO, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 17.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Falecido: " + ( cAlias)->ANIMAMORTO, oFont,, ; CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Porte: " + ( cAlias)->PORTE , oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 7.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Rga: " + ( cAlias)->RGA, oFont,, ; CLR_BLACK,, PAD_CENTER ) nColuna := 14.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Microchip: " + ( cAlias)->MICROCHIP, oFont,, ; CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Fobias: " + SUBST( ( cAlias)->FOBIAS, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->FOBIAS, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Ambiente: " + (cAlias)->AMBIENTE, ; oFont,, CLR_BLACK,, PAD_CENTER ) nColuna := 8.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Convivencia: " + (cAlias)->CONVIVENC, ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Alergias: " + (cAlias)->ALERGIA1 + " " ; + (cAlias)->ALERGIA2, ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Alimentação: " + SUBST( ( cAlias)->ALIMENTAC, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->ALIMENTAC, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs1: " + SUBST( ( cAlias)->OBS1, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS1, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs2: " + SUBST( ( cAlias)->OBS2, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS2, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs3: " + SUBST( ( cAlias)->OBS3, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS3, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs4: " + SUBST( ( cAlias)->OBS4, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS4, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs5: " + SUBST( ( cAlias)->OBS5, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS5, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs6: " + SUBST( ( cAlias)->OBS6, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS6, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs7: " + SUBST( ( cAlias)->OBS7, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS7, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Obs8: " + SUBST( ( cAlias)->OBS8, 1, 101 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.30 nColuna := 1.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; SUBST( (cAlias)->OBS8, 102, 207 ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 0.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; REPLICATE("-",110), oFont,, CLR_BLACK,, PAD_LEFT ) nLinha += 0.50 nColuna := 10.00 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "DONO / PROPRIETÁRIO / CLIENTE", oFontDivi,, ; CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Proprietário: " + ALLTRIM( (cAlias)->RAZ_MATRIC ) ; + " - " + ALLTRIM( (cAlias)->DEST_NOME ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Fones: " + (cAlias)->TEL + " - " ; + (cAlias)->TEL2 + " - " ; + (cAlias)->TEL3, oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; OemToAnsi( "Endere‡o: " ) + ALLTRIM( (DbClientes:cAlias)->END ) ; +", "+ (DbClientes:cAlias)->NUMERO ; +" "+ (DbClientes:cAlias)->COMPLEMENT, ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; OemToAnsi( "Bairro: " ) + (DbClientes:cAlias)->BAI ; + " - " + (DbClientes:cAlias)->CID ; + " - " + (DbClientes:cAlias)->CEP, ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; OemToAnsi( "Email: " ) + (DbClientes:cAlias)->E_MAIL ; + " - " + (DbClientes:cAlias)->EMAIL2, ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; OemToAnsi( "Obs..: " ) + (DbClientes:cAlias)->OBS1, ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; OemToAnsi( "Obs..: " ) + (DbClientes:cAlias)->OBS2, ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 0.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; REPLICATE("-",110), oFont,, CLR_BLACK,, PAD_LEFT ) nLinha += 0.50 nColuna := 3.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; "Veterinário: " + ALLTRIM( (cAlias)->MEDICOVETE ), ; oFont,, CLR_BLACK,, PAD_CENTER ) nLinha += 0.50 nColuna := 0.50 oPrn:Say( nLinha * ResLinha, nColuna * ResColuna, ; REPLICATE("-",110), oFont,, CLR_BLACK,, PAD_LEFT ) nLinha += 0.50 ENDPAGE ENDPRINT oFont:End() oFontLogo:End() oFontDivi:End() oFontList:End() oFontCurs:End() oFontSubl:End() oPen1:End() oPen2:End() oPen3:End() /* oLbx:GoTop() oLbx:Refresh() */ RETURN NIL Quote Link to comment Share on other sites More sharing options...
jfaguiar Posted January 27, 2017 Author Report Share Posted January 27, 2017 Boa tarde meu amigo kapiaba. Isso deverá funcionar tambem em arial ou só em Courier New, pois estou testando aqui e continua o problema. Quote Link to comment Share on other sites More sharing options...
gilmer Posted January 27, 2017 Report Share Posted January 27, 2017 O problema de não ficar igual em impressoras diferentes e a resolução da impressora, acaba afetando no tamanho do fonte e tamanho do tamanho do relatório, você precisa criar um calculo para ajustar o fonte conforme a resolução, a classe tprinter tem como retornar a resolução da impressora. Na Danfe.prg eu uso alguns cálculos Quote Link to comment Share on other sites More sharing options...
jfaguiar Posted January 29, 2017 Author Report Share Posted January 29, 2017 Foi exatamente que pensei ontem Gilmer, criar um redutor proporcional para a justar. Como faço para obter a resolução pela tprint? Obrigado Quote Link to comment Share on other sites More sharing options...
gilmer Posted January 30, 2017 Report Share Posted January 30, 2017 oPrn:nVertRes() // Resolução Vertical oPrn:nHorzRes() // Resolução Horizontal Quote Link to comment Share on other sites More sharing options...
rubensma Posted January 30, 2017 Report Share Posted January 30, 2017 Resolvi problemas de impressão instalando o drive da impressora na máquina, mesmo sem ela, não sei se é o caso e acredito que isso não tem nada a ver, mas deu certo. jfaguiar, no seu prg não vi a "destruição" ( ofont:end() ) dos fontes e pen que abriu. 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.