Print problem in text mode

Issues and Discussions related to Harbour

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Print problem in text mode

Post 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 ;)
Viva INTERNATIONAL HMG :D
jayadevu
Posts: 238
Joined: Tue May 19, 2009 7:10 am

Re: Print problem in text mode

Post 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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Print problem in text mode

Post 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
Viva INTERNATIONAL HMG :D
jayadevu
Posts: 238
Joined: Tue May 19, 2009 7:10 am

Re: Print problem in text mode

Post 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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Print problem in text mode

Post 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
Viva INTERNATIONAL HMG :D
jayadevu
Posts: 238
Joined: Tue May 19, 2009 7:10 am

Re: Print problem in text mode

Post 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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Print problem in text mode

Post 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
Viva INTERNATIONAL HMG :D
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Print problem in text mode

Post 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
There's nothing you can do that can't be done...
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Print problem in text mode

Post 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
Viva INTERNATIONAL HMG :D
martingz
Posts: 395
Joined: Wed Nov 18, 2009 11:14 pm
Location: Mexico

Re: Print problem in text mode

Post by martingz »

Esgici try chage this

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW\LPT_timeout

default 15 change to 1

works fine in XP
Post Reply