problem in printing function
Moderator: Rathinagiri
-
- Posts: 17
- Joined: Mon Apr 01, 2013 12:15 pm
problem in printing function
I HAVE DEVLOP A CODE FOR PRINTING FILE ON PRINTER, IT IS ORIGNALY DEVLOPED WITH CLIPPER 5.3B, NOW I TRY IT TO RUN UNDER HMG 3.1.1, I HAVE FOUND FOLLOWING PROBLEMS
(1) I HAVE CHANGE MY CODE, I HAVE CREATE A FILE ON DISK AND THEN USE WIN_PRINTFILERAW() FUNCTION TO PRINT IT ON PRINTER,
WIN_PRINTFILERAW(WIN_PRINTERGETDEFAULT(),FILENAME,"PRINT OUT FORM SOFTWARE")
WHERE FILENAME IS THE VARIABLE CONTAINS NAME OF FILE WITH EXTENTION
THIS NOT WORK, NOTHING PRINTS ON PRINTER,
(2) I HAVE USE MOLDRUK.PRG TO PRINT, IT WORKS GOOD AND PRINTS WELL, BUT IT DISTURBS THE DISPLAY OF MY SOFTWARE,
SUPPOSE THAT I HAVE DRAW LINES AND BOXES USING DIFFERENT COLORS, BUT SOFTWARE DISPLAYS BOXES OF SOME OTHER CHARACTERS, LIKE "?"
PLEASE HELP
(1) I HAVE CHANGE MY CODE, I HAVE CREATE A FILE ON DISK AND THEN USE WIN_PRINTFILERAW() FUNCTION TO PRINT IT ON PRINTER,
WIN_PRINTFILERAW(WIN_PRINTERGETDEFAULT(),FILENAME,"PRINT OUT FORM SOFTWARE")
WHERE FILENAME IS THE VARIABLE CONTAINS NAME OF FILE WITH EXTENTION
THIS NOT WORK, NOTHING PRINTS ON PRINTER,
(2) I HAVE USE MOLDRUK.PRG TO PRINT, IT WORKS GOOD AND PRINTS WELL, BUT IT DISTURBS THE DISPLAY OF MY SOFTWARE,
SUPPOSE THAT I HAVE DRAW LINES AND BOXES USING DIFFERENT COLORS, BUT SOFTWARE DISPLAYS BOXES OF SOME OTHER CHARACTERS, LIKE "?"
PLEASE HELP
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: problem in printing function
It will be better if you use the HMG print functions. It has many options.
If you have to print from Grid or Array, you can use HFCL gridprint function to directly print to win printers.
If you have to print from Grid or Array, you can use HFCL gridprint function to directly print to win printers.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: problem in printing function
Hola Rathinagiri,
Tratando de limpiar mi PC de archivos obsoletos y conservar los archivos buenos; trato de compilar el ejemplo que viene en HFCL el ejemplo de GridPrint pero me sale este error:
Y lo compilo con la versión HMG.3.1.5 y si se compila bien!. Ya se había tratado este problema?
Saludos
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Hello Rathinagiri ,
Trying to clean my PC for obsolete files and keep good records ; I try to compile the example that comes in the example of HFCL GRIDprint but I get this error:
And I compile with HMG.3.1.5 version and it compiles fine ! . He had already dealt with this problem?
regards
Tratando de limpiar mi PC de archivos obsoletos y conservar los archivos buenos; trato de compilar el ejemplo que viene en HFCL el ejemplo de GridPrint pero me sale este error:
Code: Select all
Harbour 3.2.0dev (r1312060701)
Copyright (c) 1999-2013, http://harbour-project.org/
C:/hmg.3.2/lib/libhfcl.a(GridPrint.o):GridPrint.c:(.data+0x758): undefined reference to `HB_FUN_ISCONTROLDEFINE'
collect2: ld returned 1 exit status
hbmk2: Error: Ejecutando enlazador. 1
gcc.exe C:/Users/MAQUIN~1/AppData/Local/Temp/hbmk_nbuyq6.dir/main.o C:/Users/MAQUIN~1/AppData/Local/Temp/hbmk_nbuyq6.dir/hbmk_jsavmj.o C:/hmg.3.2/Mios/GridPrint/_temp.o -Wl,--nxcompat -Wl,--dynamicbase -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lhfcl -lini -lreport -lmsvfw32 -lvfw32 -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbmysql -lmysql -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbfimage -lhbpgsql -lhbnetio -lxhb -lpng -llibhpdf -lhbvpdf -lhbzebra -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -omain.exe -LC:/hmg.3.2/harbour/lib/win/mingw -LC:/hmg.3.2/lib
hbmk2: Error: Funci¢n(es) referenciada, no encontrada, pero desconocida:
ISCONTROLDEFINE()
Saludos
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Hello Rathinagiri ,
Trying to clean my PC for obsolete files and keep good records ; I try to compile the example that comes in the example of HFCL GRIDprint but I get this error:
Code: Select all
Harbour 3.2.0dev ( r1312060701 )
Copyright ( c ) 1999-2013 , http://harbour-project.org/" onclick="window.open(this.href);return false;
C :/ hmg.3.2/lib/libhfcl.a ( GridPrint.o ) GridPrint.c : ( . Data +0 x758 ) : undefined reference to ` HB_FUN_ISCONTROLDEFINE '
collect2 : ld returned 1 exit status
hbmk2 : Error : Running linker. 1
gcc.exe C :/ Users / ~ 1/AppData/Local/Temp/hbmk_nbuyq6.dir/main.o MAQUIN C :/ Users / ~ 1/AppData/Local/Temp/hbmk_nbuyq6.dir/hbmk_jsavmj.o C :/ MAQUIN hmg.3.2/Mios/GridPrint/_temp.o -Wl, - NXCOMPAT -Wl, - DynamicBase - mwindows -Wl, - start -group- lcrypt - lhmg - ledit - leditex - lgraph - lhfcl - lini - lreport - lmsvfw32 - lvfw32 - lhbct - lhbwin - lhbmzip - lminizip - lhbmemio - lhbmisc - lhbmysql - lmysql - lhbtip - lsqlite3 - lhbsqlit3 - lsddodbc - lrddsql - lsddmy - lhbodbc - lodbc32 - lhbhpdf - lhbfimage - lhbpgsql - lhbnetio - lxhb - lpng - llibhpdf - lhbvpdf - lhbzebra - lhbextern - lhbdebug - lhbvmmt - lhbrtl - lhblang - lhbcpage - lgtcgi - lgtpca - lgtstd - lgtwin - lgtwvt - lgtgui - lhbrdd - lhbuddall - lhbusrrdd - lrddntx - lrddcdx - lrddnsx - lrddfpt - lhbrdd - lhbhsx - lhbsix - lhbmacro - lhbcplr - lhbpp - lhbcommon - lhbmainwin - lkernel32 - luser32 - lgdi32 - ladvapi32 - lws2_32 - lwinspool - lcomctl32 - lcomdlg32 - lshell32 - luuid - lole32 - loleaut32 - lmpr - lwinmm - lmapi32 - limm32 - lmsimg32 - lwininet - lhbpcre - lhbzlib -Wl, - end -group- omain.exe -LC -LC :/ :/ hmg.3.2/harbour/lib/win/mingw hmg.3.2/lib
hbmk2 : Error: Function ¢ n (s ) referenced , not found , but unknown :
ISCONTROLDEFINE ( )
?
regards
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: problem in printing function
I will check up and come back. Thanks for the report.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: problem in printing function
Hi Rathi,Rathinagiri wrote:I will check up and come back. Thanks for the report.
please check in GridPrint.prg and GridPDF.prg files of HFCL,
where it says:
IsControlDefine
should say:
IsControlDefined
Re: problem in printing function
I'm still using such a construction and it works OK for me:
Code: Select all
TmpPrintFile := TempFile(kat_TMP,"tmp",0)
set printer to &TmpPrintFile
set device to print
setprc(0,0)
@ prow(), pcol() say "Here is something to print..."
set printer to
set device to screen
WIN_PRINTFILERAW( WIN_PRINTERGETDEFAULT(), TmpPrintFile , "text mode printing job")
*----------------
function TempFile
param cFolder, cExt, nFileAttr
local cFileName, nHandle
cFileName := cFolder+ if(right(cFolder,1)<>"\","\","")+strtran(str(numxor(val(dtos(date())),seconds()),8)," ","0")+"."+cExt
return cFileName
*---------------
Re: problem in printing function
Dear Molmol wrote:I'm still using such a construction and it works OK for me:Code: Select all
TmpPrintFile := TempFile(kat_TMP,"tmp",0) set printer to &TmpPrintFile set device to print setprc(0,0) @ prow(), pcol() say "Here is something to print..." set printer to set device to screen WIN_PRINTFILERAW( WIN_PRINTERGETDEFAULT(), TmpPrintFile , "text mode printing job") *---------------- function TempFile param cFolder, cExt, nFileAttr local cFileName, nHandle cFileName := cFolder+ if(right(cFolder,1)<>"\","\","")+strtran(str(numxor(val(dtos(date())),seconds()),8)," ","0")+"."+cExt return cFileName *---------------
How to send print to Virtual printer i.e. DOS2USB
I could not test with above code, what changes require because dos2usb does not show in printer's list
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: problem in printing function
I don't know DOS2USB application.bpd2000 wrote: Dear Mol
How to send print to Virtual printer i.e. DOS2USB
I could not test with above code, what changes require because dos2usb does not show in printer's list
You don't need this software, I think.
When you capture your printout by
Code: Select all
set device to print
set printer to &TmpPrintFile
Then, you can send it to any windows printer by WIN_PRINTFILERAW.
You must remember to send control codes (PCL language for hp and almost all laser printers, ESC-P for dot matrix).
When your printer does not support control codes (DGI printers where whole job is preprocessed on computer), you can use MOLPrint.exe (I've posted whole code some years ago).
I hope this information was useful for you...
Re: problem in printing function
Thank you Mol for your guidance
Regards
Regards
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: problem in printing function
+1srvet_claudio wrote:Hi Rathi,
please check in GridPrint.prg and GridPDF.prg files of HFCL,
where it says:
IsControlDefine
should say:
IsControlDefined