Página 3 de 3
Clipper 5.2 and Printing Logo
Enviado: 26 Ago 2011 10:03
por marge0512
Hello! I know it's been a while but I'm back.
It was suggested that I convert my Clipper Summer87 application to XHarbour. I upgraded to Harbour (I believe there is a fee for XHarbour and Harbour is free) with the help of people from the Harbour site. It would not have been painful if I had known Clipper but they even helped me with debugging, which I knew nothing about. I have learned a lot and things seem to be going smoothly but.........I'm still not at the point where I can test that function to print a bitmap on paper yet........but I'm moving along. Things have been crazy at work.
What I need help with now is learning how to print in Clipper. I want to learn how to do this in Clipper and Harbour but I'll worry about Harbour later. I would like to understand in both. Maybe it's the same. I do not know.
My Clipper application prints reports just fine for the users that use the system. I'm guessing it's because they sit in a different building than I do and the application is directed to their printer and not mine. The problem is that I have no idea where to look. I've searched in programs and .bat files but I still don't see where it actually "tells" the application what printer to use. Could someone please help point me to what direction I should be looking?
Thanks in advance!!
Clipper 5.2 and Printing Logo
Enviado: 26 Ago 2011 18:38
por Clipper
Dear Merge, a possibility to print a logo using the clipper would use Dosprinter or another similar program, with it you can print your reports with many other options.
Here are two reports printed by a program of mine.
In the first report the background image is a BMP image
In the second report the image that goes on top is a JPG image.
All done with Clipper + Dosprinter
See you soon.
Marcelo
Clipper 5.2 and Printing Logo
Enviado: 29 Ago 2011 11:11
por marge0512
Thanks for replying!
That looks great! I downloaded a free version of DosPrinter V12.02 but in the setup there is a "Letterhead" tab that allows you to enter a file name with an .rtf extension. How do I put in the name of a .jpg or .bmp image?
Clipper 5.2 and Printing Logo
Enviado: 29 Ago 2011 21:21
por Clipper
Dear Merge
I think the version you used is different from the one I use, take down version I use.
http://www.phrep.com.br/dosprinter.rar
Read the file DOSPRINTER.PDF it contains everything you need to create great reports.
Below is part of the program code that generates the first report of the previous post.
Código: Selecionar todos
SET DEVICE TO PRINT
SET PRINTER TO TELA.
SETPRC(0,0)
SET MARGIN TO 1
INICIA=CHR(27)+"@"
NORMAL=CHR(27)+CHR(18)
NEGON=CHR(27)+"E"
NEGOFF=CHR(27)+"F"
NGER=PEGAGER(WGER)
SELE ZZGER
@ PROW(),PCOL() SAY "k"+CHR(15)
@ PROW(),PCOL() SAY CHR(27)+"w1"
@ 11,16 SAY NEGON+"CERTIFICADO DE EFLUENTE TRATADO - "+TRANSFORM(NNCERTIFIC,"@R 999-9999/9999")+NEGOFF
@ PROW(),PCOL() SAY CHR(27)+"w0"
@ 12,00 SAY REPLICATE("Í",76)
@ PROW(),PCOL() SAY "k"+CHR(1)
@ 15,00 SAY "Cliente : "+GERNOM
@ 16,00 SAY "Endereco : "+GEREND
@ 17,00 SAY "Bairro : "+GERBAI
@ 18,00 SAY "Cidade : "+GERCID
@ 19,00 SAY "CNPJ : "+TRANSFORM(GERCGC,"@R 99.999.999/9999-99")
@ 20,00 SAY REPLICATE("Ä",76)
@ PROW(),PCOL() SAY NEGON
*@ 24,00 SAY CHR(27)+"-1"+"Per¡odo / Efluente / Volume Tratado"+CHR(27)+"-0"
@ PROW(),PCOL() SAY NEGOFF
@ 24,00 SAY "Per¡odo : "+DTOC(LDATI)+" a "+DTOC(LDATF)
@ 25,00 SAY "Res¡duo : EFLUENTE LIQUIDO"
@ 26,00 SAY "Volume : "+LTRIM(TRANSFORM(CVOLUME,"@E 999,999.999")+" M3")
@ 29,00 SAY REPLICATE("Ä",76)
@ 33,01 SAY " Em cumprimento a legislação vigente, certificamos que a SUAPE"
@ 34,01 SAY "EMPREENDIMENTOS AMBIENTAIS LTDA - SEAL, estabelecida a BR 101 SUL,1920,"
@ 35,01 SAY "Galpão 120, Cabo de Santo Agostinho - Pernambuco, inscrita no CNPJ sob No."
@ 36,01 SAY "12.607.992/0001-07 e com Licença de Operação da CPRH No. "+WLICENCA+","
@ 37,01 SAY "prestou os serviços de tratamento de efluentes industriais ao cliente supra-"
@ 38,01 SAY "citado utilizando a ETR de sua propriedade."
@ 44,01 SAY " Cabo de Santo Agostinho, "+STRZERO(DAY(DATE()),2)+" de "+ALLTRIM(NMES(DATE()))+" de "+STR(YEAR(DATE()),4)+"."
@ 52,06 SAY "___________________________ __________________________"
@ 53,06 SAY "Eduardo Jos‚ de Moura Veras Carlos Abdenor Neiva Nunes"
@ 54,06 SAY " Supervisor T‚cnico Diretor Executivo"
@ 57,00 SAY REPLICATE("Í",76)
VHEXA=CONVERTE("CET"+NNCERTIFIC+"SEAL")
@ 58,22 SAY VHEXA
BBAR=LD39("CET"+NNCERTIFIC+"SEAL")
ACODE=LDGENERATE(11,BBAR,40,3,23)
FOR I=1 TO LEN(ACODE)
@ 59,PCOL() SAY ACODE[I]
NEXT
EJECT
SET PRINTER TO
SET DEVICE TO SCRE
RELTELAC()
*-------------------*
FUNCTION RELTELAC(MARCA)
*-------------------*
IF MARCA="T"
SWPRUNCMD("DP /PDF /GON /PAGEA4 /CP860 /F'Lucida Console' /LIN /IMAGE'LOGO.BMP,200,50,800' TELA.") // Here is where the Dosprinter runs.
ELSEIF MARCA="S"
SWPRUNCMD("DP /PDF /GON /PAGEA4 /CP860 /F'Lucida Console' /LIN /IMAGE'MARCA.BMP,1000,3200' TELA.") // Here is where the Dosprinter runs.
ENDIF
RETURN(.T.)
See you soon.
Marcelo
Clipper 5.2 and Printing Logo
Enviado: 30 Ago 2011 11:06
por marge0512
Thanks for this information!!
The site you sent will not allow me to download though. McAfee detects the patch as a trojan and cancels the download. Did this software cost you anything?
Clipper 5.2 and Printing Logo
Enviado: 30 Ago 2011 11:27
por Clipper
Dear Merge
Sorry for the inconvenience, this patch is not necessary, was removed from the file, you can usually download the file now.
See you soon.
Marcelo
Clipper 5.2 and Printing Logo
Enviado: 30 Ago 2011 12:18
por marge0512
I'm sorry Clipper, it still won't allow me to download and detects "Patch.exe" as a trojan for some reason.
Clipper 5.2 and Printing Logo
Enviado: 30 Ago 2011 13:29
por Clipper
Dear Merge
This is very strange, does not exist patch.exe file within the package that is available.
In the link below you can download the version provided by the author.
http://www.softpedia.com/progDownload/D ... -1974.html
Below get the user's manual in PDF.
http://www.phrep.com.br/dosprinter.pdf
See you soon.
Marcelo
Clipper 5.2 and Printing Logo
Enviado: 30 Ago 2011 14:18
por marge0512
Thank you!
Also, it gave me an error that said make sure the file is not write protected or not in use.
But, because you said there was no Patch.exe, I decided to do a McAfee scan and so far there are 32 detections so there must be something wrong at my end.
I will try again after the scan is finished.