Page 1 of 2

Print problem in text mode

Posted: Sat Nov 30, 2013 10:23 am
by esgici
Hi All

A S'87 application compiled by HB32 and works fine now,

except a few little (!) problems :(

Print output doesn't actually print unless QUIT :o

Any idea :?

Viva Clipper, viva Harbour, viva HMG and fans :D

PS : Yes, I will ask to Harbour groups, if nobody help me here ;)

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 10:25 am
by jayadevu
Hi,

What printer are you printing to ? USB, Parallel port printer ?

Please also check the properties of the printer like Whether spooling is ON etc.

Pls report.

Warm regards,

Jayadev

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 10:33 am
by esgici
jayadevu wrote:Hi,

What printer are you printing to ? USB, Parallel port printer ?

Please also check the properties of the printer like Whether spooling is ON etc.

Pls report.

Warm regards,

Jayadev
Thank to interest Jayadev,

and sorry, you are right, inadequate report :(

WinXP, LPT1, net use ...

TIA

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 10:49 am
by jayadevu
Hi,

Please use the following command to fire the job:

#ifdef __XHARBOUR__
WinPrintRaw( cPrinter,cFile,cFile )
#else
WIN_PRINTFILERAW( cPrinter, cFile, cFile )
#endif

Where cPrinter is your printer, cFile is your ".txt" or ".prn" file , the cFile is repeated as 2nd parameter to show the file name in the printer properties just as a word file is seen in the printer properties.

HTH,

Warm regards,

Jayadev

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 11:26 am
by esgici
jayadevu wrote:Hi,

Please use the following command to fire the job:

#ifdef __XHARBOUR__
WinPrintRaw( cPrinter,cFile,cFile )
#else
WIN_PRINTFILERAW( cPrinter, cFile, cFile )
#endif

Where cPrinter is your printer, cFile is your ".txt" or ".prn" file , the cFile is repeated as 2nd parameter to show the file name in the printer properties just as a word file is seen in the printer properties.

HTH,

Warm regards,

Jayadev
Thank Jayadev :)

Quite big project, too many .prg, too many

Code: Select all

SET DEVICE TO PRINT
SET PRINTER TO ...
SET PRINT ...
...
commands :(

May be easier to convert project to HMG and MiniPrint ;)

And, you know, WIN_PRINTFILERAW() depends to printer properties, some printers doesn't support this printing way :(

Any other simple / practical / easy / global way ?

FE: DOSPRINT / DOSPRN / NODOSIMP may be useful ?

TIA

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 11:37 am
by jayadevu
Hi,

Are you first creating a text file and firing on to the printer or are you firing the job directly to the printer.

For example: Creating a file and printing..

Set Printer to (cFileName)
Set Device to printer
Set Printer on
..All your print commands
..
Set Device to Screen
Set Printer to

WinPrintRaw(cFileName)

Please clarify. If you are using the above approach, I can help you with a generic text converter.

Warm regards,

Jayadev

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 1:50 pm
by esgici
jayadevu wrote: Are you first creating a text file and firing on to the printer or are you firing the job directly to the printer.

For example: Creating a file and printing..

Set Printer to (cFileName)
Set Device to printer
Set Printer on
..All your print commands
..
Set Device to Screen
Set Printer to

WinPrintRaw(cFileName)

Jayadev
I'm afraid that I couldn't explain well :(

These subjects ( console mode print, WinPrintRaw, SET PRINT ... etc ) discussed repeatedly, my goal isn't re-open known issues :(

My problem simply is : under SAME conditions ( OS, printer, ports etc ) 16 bit version of application do print well, 32 bit version doesn't :(
Please clarify. If you are using the above approach, I can help you with a generic text converter.
I hope that I explained above why I don't use this approach.

Please you clarify, which text conversion you are about :?

I'm wondering how a conversion will help to solve this type print problem :?

Anyway thank to your interest and valuable tips :arrow:

Viva HMG :D

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 2:13 pm
by serge_girard
Esgici,

Have you tried this way?

Code: Select all

SET PRINTER TO PRN  // OR LPT1
SET PRINTER ON 
SET CONSOLE OFF
? 'commands etc...'
SET PRINTER OFF
SET PRINTER TO
SET CONSOLE ON
Greetings, Serge

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 3:11 pm
by esgici
serge_girard wrote:Esgici,

Have you tried this way?

Code: Select all

SET PRINTER TO PRN  // OR LPT1
SET PRINTER ON 
SET CONSOLE OFF
? 'commands etc...'
SET PRINTER OFF
SET PRINTER TO
SET CONSOLE ON
Greetings, Serge
All are already included in the all .prg files :(

Anyway, thank to interest :)

TIA :D

Re: Print problem in text mode

Posted: Sat Nov 30, 2013 8:33 pm
by martingz
Esgici try chage this

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW\LPT_timeout

default 15 change to 1

works fine in XP