Printing in Harbour

1,572 views
Skip to first unread message

Swaroop Joshi

unread,
Nov 28, 2018, 2:43:28 PM11/28/18
to Harbour Users

With the Help of Harbour i have converted my Clipper Software to 64 Bit Compatible Dos Software and is running fine

But the Problem is when i give Print with the help of Dos2usb 2.2  it prints after i close the program.

Even in Win7 32 bit, Print from New Software comes after closing the program. 

But the old clipper software prints fine in WIN7 32 bit via Dos2usb 2.2


Please Help me, Thanks in Advance





Massimo Belgrano

unread,
Nov 29, 2018, 8:45:19 AM11/29/18
to harbou...@googlegroups.com
imo youi nedd evolve your software using printer object or a pdf file or........
set printer to s a more intellinget in harbour but not exist  solution easy 

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Massimo Belgrano
Delta Informatica S.r.l. (Cliccami per scoprire 

Klas Engwall

unread,
Nov 29, 2018, 10:12:01 AM11/29/18
to harbou...@googlegroups.com
Hi Joshi,

> With the Help of Harbour i have converted my Clipper Software to 64 Bit
> Compatible Dos Software and is running fine
>
> But the Problem is when i give Print with the help of Dos2usb 2.2  it
> prints after i close the program.

As far as I can see on the web, Dos2Usb captures print jobs from LPT
ports and sends them to a USB printer. So there seems to be a
redirection of one or more LPT ports in your system to accomplish that.

The problem "it prints after i close the program" is common where
network redirection is involved and not correctly configured, so LPT1 is
pointing to a virtual port which is pointing back to LPT1, in a circle.
That circle is broken after exiting the program so the print job can
find the real printer. The fact that Dos2Usb captures LPT ports makes me
suspect that your problem is similar. So what I would suggest is that
you investigate if you in fact have a circular redirection in your
system, and that maybe your solution is to print to LPT2 or LPT3 instead
of LPT1 and let Dos2Usb capture that. Usually, with one physical LPT
port in the computer, that port is LPT1, but LPT2 and LPT3 do not exist
as physical ports and thus cannot cause circular redirection.

Regards,
Klas

Swaroop Joshi

unread,
Nov 29, 2018, 11:22:09 AM11/29/18
to Harbour Users
But the Same program when i compile in Clipper, Dos2usb prints properly without closing the software

Hurricane

unread,
Nov 29, 2018, 11:27:54 AM11/29/18
to Harbour Users
Hi, I've sent you an email now.

Swaroop Joshi

unread,
Nov 29, 2018, 12:52:45 PM11/29/18
to Harbour Users
HI, i have not recd email

Diego Fazio

unread,
Nov 29, 2018, 1:50:31 PM11/29/18
to Harbour Users
I had the same problem many years ago. You could change dos2usb with prtwin. Very similar. 
Or you should use win_Prn() 

Diego.

Koshal Agarwal

unread,
Nov 30, 2018, 9:02:52 AM11/30/18
to Harbour Users
try editing system registry with these steps 

open registry with regedit
press F3 (open search of regedit)
type lpt_timeout
you will find one keys there 
change value from 15 to 1 and save 
press again F3
it will jump to another key 
change it too to 1 from 15 
and close registry editor 
(hopefully your problem will be solved)

Swaroop Joshi

unread,
Nov 30, 2018, 12:20:19 PM11/30/18
to Harbour Users
Actually LPT_timeout is usefull in Wndows XP in Windows-7 32 bit LPT-timeout is already 1

Koshal Agarwal

unread,
Dec 1, 2018, 1:06:07 AM12/1/18
to Harbour Users
are u using DMP draft mode or USB printer 
if laser or DJet then you may rewrite reports in Harbour with great flexibility then clipper  it hardly takes 20 min to rewrite report to harbour format by using it you may not need to use dos2usb or dosprn too

Jayadev U

unread,
Dec 2, 2018, 1:56:29 AM12/2/18
to harbou...@googlegroups.com

Hi Swaroop,

 

You can use the following generic function to print directly.

 

https://www.dropbox.com/s/x6fg8x2ngmc6cuv/txt2gdih.prg?dl=0

 

Please modify it to suit your purpose.

 

HTH,

 

Warm regards,

 

Jayadev

--

ax.a...@gmail.com

unread,
Dec 14, 2018, 9:01:44 AM12/14/18
to Harbour Users


On Thursday, November 29, 2018 at 1:13:28 AM UTC+5:30, Swaroop Joshi wrote:

ax.a...@gmail.com

unread,
Dec 14, 2018, 9:06:38 AM12/14/18
to Harbour Users
Hi
Swaroop
 
if you are using 

HB32 harbour verson

than
you can use

hbwin printing utility

I was found same problem before some years
for converting dos program to transfer printing to usb

I got permanent solution and getting printing without delay

if you need example
i can send you sample code
give your email me

ax dot acsoft at gmail dot com

thanks
ax
 

Reinaldo

unread,
Dec 15, 2018, 6:03:42 PM12/15/18
to Harbour Users
Just on a hunch; try seeing eof followed by an eject page ASCII code (chr(12) after sending your print job.  See if that does the trick.


Reinaldo.

matt johnson

unread,
Dec 15, 2018, 8:55:54 PM12/15/18
to harbou...@googlegroups.com
try "set printer to"  (twice ) will force print job to close .




Swaroop Joshi

unread,
Jan 9, 2019, 12:32:17 AM1/9/19
to Harbour Users
Hi pls help me my email id - swaroop...@gmail.com

Swaroop Joshi

unread,
Jan 9, 2019, 12:37:44 AM1/9/19
to Harbour Users
with out using HBwin and other Harbour printing utilty, is there any other easy way to print from 64 bit Software, As my New 64 bit software prints but after exiting the software


On Thursday, November 29, 2018 at 1:13:28 AM UTC+5:30, Swaroop Joshi wrote:

Vikram Chhajer

unread,
Jan 24, 2019, 8:02:48 PM1/24/19
to Harbour Users
Hi
Can u send the example of printing prg

Thank you
Vikram

Message has been deleted

Hurricane

unread,
Jan 28, 2019, 12:59:27 AM1/28/19
to Harbour Users
Hi,

I have more news about graphic migration that will be announced on another page :D

regards,

Richard Visscher

unread,
Jan 28, 2019, 11:58:10 AM1/28/19
to Harbour Users
Hi,

I did not give you permission to use Pagescript32 as a commercial library in this project, i offer Pagescript as free library
NOT for using it in you're own print/pdf library.

Richard





p maandag 28 januari 2019 06:59:27 UTC+1 schreef Hurricane:

Swaroop Joshi

unread,
Jan 28, 2019, 2:12:53 PM1/28/19
to Harbour Users
Thanks but my Problem is Solved by writing Code this way

     SET DEVI TO PRINT
     SET CONSOLE OFF 
     SET PRINTER ON  
     SET PRINTER TO LPT1 
     SETPRC(0,0)

      Printing Code

     Eject
     SET PRINTER OFF 
     SET CONSOLE ON     
     SET DEVICE TO SCREEN 
     SET PRINTER TO 

     The Above Program now prints fine with the help of DOS2USB Software

Swaroop Joshi

unread,
Jan 28, 2019, 2:18:06 PM1/28/19
to Harbour Users
Ok I will definitely try.....

Vikram Chhajer

unread,
Jan 28, 2019, 9:07:15 PM1/28/19
to harbou...@googlegroups.com
Hi swaroop
Why use 3rd programm when u can use Harbour print prg in future any thing get wrong with dos2usb than again you have to write new prg , as i also use dos2usb last 2 year ago . but with the help of this harbour group i got printing code which works directly run from our prg and print directly to any usb printer .As i use prg of Mr jayadev .its very simple to inbuilt in our prg . I suggest you go thru once .

Never Stop Learning 
Thanks 
Vikram

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to a topic in the Google Groups "Harbour Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/harbour-users/KllGjVABAhw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to harbour-user...@googlegroups.com.

jtlk...@gmail.com

unread,
Nov 9, 2020, 8:48:08 AM11/9/20
to Harbour Users
mr.jayadev 

 the following generic function to print directly.

  https://www.dropbox.com/s/x6fg8x2ngmc6cuv/txt2gdih.prg?dl=0   this file is deleted,

last two years i aslo use dos2usb via printing

pls send code jtlk...@gmail.com mail id

Jayadev U

unread,
Nov 10, 2020, 3:58:58 AM11/10/20
to harbou...@googlegroups.com

Hello,

 

Please download from the updated link below.  Minor changes were required by one of the users and hence the file was modified a little and the link changed.

 

https://www.dropbox.com/s/vcs8aelunwhd1wy/txt2gdih.prg?dl=0

Reply all
Reply to author
Forward
0 new messages