For Programmers: Free Programming Magazines  


Home > Archive > Clipper > December 2007 > Prinitng









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Prinitng
Martin Elman

2007-10-21, 6:55 pm

We have just moved from Win 98 to XPpro and whilst the printers work ok
there is a delay before printing which is only got round by either prining
another page or exiting clipper. Any suggestions?

Clipper 5.2, XP Pro, Brother Lasers running PCL6 under HP driver

Thanks in advance


N:dlzc D:aol T:com \(dlzc\)

2007-10-21, 6:55 pm

Dear Martin Elman:

"Martin Elman" <martin@iteloffice.com> wrote in message
news:bQQSi.15996$8c4.3329@newsfe6-win.ntli.net...
> We have just moved from Win 98 to XPpro and whilst
> the printers work ok there is a delay before printing
> which is only got round by either prining another
> page or exiting clipper. Any suggestions?
>
> Clipper 5.2, XP Pro, Brother Lasers running PCL6
> under HP driver


Make sure you have upgraded to 5.2e at The Oasis.

After printing the last page, you should do something like:
SET PRINTER OFF
SET PRINTER TO

You have to let WinDoze know you don't need to add any more to
the past page.

David A. Smith


sebas22

2007-10-22, 3:55 am

On Sun, 21 Oct 2007 22:58:15 GMT, "Martin Elman"
<martin@iteloffice.com> wrote:

>We have just moved from Win 98 to XPpro and whilst the printers work ok
>there is a delay before printing which is only got round by either prining
>another page or exiting clipper. Any suggestions?


Try to put
SET PRINTER OFF
SET PRINTER TO
in your program, after the job is finished.

--
Regards,
Sebas
Vitomir Cvitanovic

2007-10-22, 3:55 am

Martin,

Another thing you should think about is LPT timeout under XP - by default it
is 15 secs. To change this you should update registry:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentContro
lSet\Control\WOW]
"LPT_timeout"="3"

Repeat these step for every computer running any version of Windows 2000 or
Windows XP, including the data server, Citrix/Terminal Server, and all
remote workstations connected via Citrix/Terminal Services.

Regards,
Vito


kudlaty@proscan.com.pl

2007-10-22, 6:55 pm

My solution:

Print to file, then "TYPE" this file to printer.

set print on
set console off
set device to print
set printer to ( cMyPath + "\WYDRUKI\temp.prn" )

********************************
something to print
********************************
set printer to
Set console on
set printer off
set device to screen

text := "TYPE " + cMyPath + "\WYDRUKI\temp.prn > PRN"
__RUN( text )
Ferase( cMyPath + "\WYDRUKI\temp.prn" )

Klas Engwall

2007-10-23, 6:55 pm

Martin,

>We have just moved from Win 98 to XPpro and whilst the printers work ok
>there is a delay before printing which is only got round by either prining
>another page or exiting clipper. Any suggestions?
>
>Clipper 5.2, XP Pro, Brother Lasers running PCL6 under HP driver


The most common reason for this kind of failure is a missing SET
PRINTER TO LPT<n> before the print job. Do you have SET PRINTER TO
<nothing> to close the port at the end of the job? That will only work
if Clipper knows which port to close.

You of course also need an EJECT at the end of the last page.

Regards,
Klas

-------
klas dot engwall at engwall dot com

http://www.engwall.com/clipper/

The LFN Library for Clipper
The LanMan Library for Clipper
The NFPAT1A Timeslice release patch for the Nanforum Toolkit
Frank

2007-10-24, 3:55 am

Klas Engwall knastet inn: :
> Martin,
>
>
> The most common reason for this kind of failure is a missing SET
> PRINTER TO LPT<n> before the print job. Do you have SET PRINTER TO
> <nothing> to close the port at the end of the job? That will only work
> if Clipper knows which port to close.


I think - when you force another port - Win will handle this, and Clipper
may use the PRN (or LptX) device.

What works for me, is

OnPrinter()
// SET CONSOLE OFF, SET DEVICE TO PRINT, SET PRINT ON

//
// Run Print job
//

OffPrinter()
// SET DEVICE TO SCREEN, SET PRINT OFF, SET CONSOLE ON

// Force another port - always there

SET PRINTER TO NUL

OnPrinter()
nPrnRow := pRow()
nPrnCol := pCol()

?? "" // Then, Send an empty string "" to the NUL port, before

SetPrc( nPrnRow, nPrnCol )
OffPrinter()


// And release the NUL port
SET PRINTER TO


>
> You of course also need an EJECT at the end of the last page.



With the approach above - EJECT command, is not needed

--

I don't remember why, but I've tested this years and years ago, and
implemented this in my code since then. It works.
cherszage@gmail.com

2007-10-27, 6:55 pm

On Oct 24, 4:03 am, Frank <NoSpam...@online.no> wrote:
> Klas Engwall knastet inn: :
>
>
>
>
>
> I think - when you force another port - Win will handle this, and Clipper
> may use the PRN (or LptX) device.
>
> What works for me, is
>
> OnPrinter()
> // SET CONSOLE OFF, SET DEVICE TO PRINT, SET PRINT ON
>
> //
> // Run Print job
> //
>
> OffPrinter()
> // SET DEVICE TO SCREEN, SET PRINT OFF, SET CONSOLE ON
>
> // Force another port - always there
>
> SET PRINTER TO NUL
>
> OnPrinter()
> nPrnRow := pRow()
> nPrnCol := pCol()
>
> ?? "" // Then, Send an empty string "" to the NUL port, before
>
> SetPrc( nPrnRow, nPrnCol )
> OffPrinter()
>
> // And release the NUL port
> SET PRINTER TO
>
>
>
>
> With the approach above - EJECT command, is not needed
>
> --
>
> I don't remember why, but I've tested this years and years ago, and
> implemented this in my code since then. It works.


Hi Frank
It's not so clear for me what do you mean with OnPrinter() and
OffPrinter().
Can you please explain it ?
TIA
Claudio

N:dlzc D:aol T:com \(dlzc\)

2007-10-27, 6:55 pm

Dear cherszage:

<cherszage@gmail.com> wrote in message
news:1193522858.717499.227920@22g2000hsm.googlegroups.com...
> On Oct 24, 4:03 am, Frank <NoSpam...@online.no> wrote:

....
....[color=darkred]
> Hi Frank
> It's not so clear for me what do you mean with OnPrinter() and
> OffPrinter().
> Can you please explain it ?


He included it in the comments:[color=darkred]

function OnPrinter
SET CONSOLE OFF
SET DEVICE TO PRINT
SET PRINT ON
return NIL
[color=darkred]

function OffPrinter
SET DEVICE TO SCREEN
SET PRINT OFF
SET CONSOLE ON
return NIL

David A. Smith


magdy_salam

2007-12-06, 12:55 pm

quote:
Originally posted by Martin Elman
We have just moved from Win 98 to XPpro and whilst the printers work ok
there is a delay before printing which is only got round by either prining
another page or exiting clipper. Any suggestions?

Clipper 5.2, XP Pro, Brother Lasers running PCL6 under HP driver

Thanks in advance



Dear ,

Try to print to file then use my solution


Step 1
============
Downlaod my software from the link http://www.4shared.com/file/2934903...rified=7a4c70fc and install it to c:\dos2win directory
After installation Extract the attached file dos2win.zip to c:\ , This will update your dos2win.exe file
Now you can run the program c:\dos2win\dos2win.exe

Step 2
=============
From Windows XP you will do the following :

1 - Under Settings/Printers addd a new printer. The printer type or model is not important! We will use the printer port only, not the driver.

2- Right click on the newly created printerr icon. Go into Properties / Ports / Add Port / select LocalPort / click New Port / Enter a port name: "C:\DOS2WIN\PRTJOBS\TEST.PRN"., click Close.

3 - Right click again on the printer icon. Click Sharing on the menu. Then click on Shared as. Input a network name for the printer, something like "DP1".
- Enter command prompt (run command.com) aand type: NET USE LPT1 \\MyPcName\DP1.
MyPcName is your network computer name. Later, you can insert this line in a batch file, right before calling your program.

4 -You can start your DOS program now, and every print gets redirected to C:\DOS2WIN\PRTJOBS\TEST.PRN.


Pls test this solution and send to me the results
If you need any help pls contact me

Waiting for your reply
Best regards
Magdy_salam@yahoo.com


Magdy Abdrabpoh
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com