PDA

View Full Version : RE: DOS Printing WinXP Pro


Byte
October 12th 05, 08:34 PM
Print From DOS with WindowsXP
http://members.shaw.ca/bsanders/printfromdos.htm
--
XP-WNP
Today is the first day of the
rest of your life.


"
Chris Alvarado" wrote:

> Hello,
> I have a situation that I would like to see if anyone else has had this
> particular problem...First the specifics, Intel P4 3.0, 1GB RAM, 200 GB HD,
> WinXP Pro. This motherboard did not have a parallel port natively. A PCI I/O
> port was added to provide parallel printing support. Printer: Epson LQ-590
> impact printer. Prints on LPT1. This printer prints from a DOS app and has
> a peculiar problem. The from that prints is 11" and after printing all the
> data on the form, the printer will halt for about 8-10 seconds, and not
> complete the remaining data on the last two inches of the form. After the
> 8-10 seconds are up, the printing will resume. All normal. Everything
> perfectly aligned, etc., etc. This happens on every form or report that we
> print. Things I have already done to try to correct the problem are,
> uninstall the driver and reinstall the driver using the latest from Epson.
> Microsoft's Knowledgebase had some things to try but ultimately that didn't
> work. If you have a possible idea, fix, try, anything, I will be grateful to
> try.
>
> Thanks,
>
> Chris Alvarado
>

Chris Alvarado
October 12th 05, 08:52 PM
Thanks Byte, I'll give those things a go.

Chris

"Byte" wrote:

> Print From DOS with WindowsXP
> http://members.shaw.ca/bsanders/printfromdos.htm
> --
> XP-WNP
> Today is the first day of the
> rest of your life.
>
>
> "
> Chris Alvarado" wrote:
>
> > Hello,
> > I have a situation that I would like to see if anyone else has had this
> > particular problem...First the specifics, Intel P4 3.0, 1GB RAM, 200 GB HD,
> > WinXP Pro. This motherboard did not have a parallel port natively. A PCI I/O
> > port was added to provide parallel printing support. Printer: Epson LQ-590
> > impact printer. Prints on LPT1. This printer prints from a DOS app and has
> > a peculiar problem. The from that prints is 11" and after printing all the
> > data on the form, the printer will halt for about 8-10 seconds, and not
> > complete the remaining data on the last two inches of the form. After the
> > 8-10 seconds are up, the printing will resume. All normal. Everything
> > perfectly aligned, etc., etc. This happens on every form or report that we
> > print. Things I have already done to try to correct the problem are,
> > uninstall the driver and reinstall the driver using the latest from Epson.
> > Microsoft's Knowledgebase had some things to try but ultimately that didn't
> > work. If you have a possible idea, fix, try, anything, I will be grateful to
> > try.
> >
> > Thanks,
> >
> > Chris Alvarado
> >

Byte
October 13th 05, 03:36 PM
Hope it works for you and happy putering. :~)
--
XP-WNP
Today is the first day of the
rest of your life.


"
Chris Alvarado" wrote:

> Thanks Byte, I'll give those things a go.
>
> Chris
>
> "Byte" wrote:
>
> > Print From DOS with WindowsXP
> > http://members.shaw.ca/bsanders/printfromdos.htm
> > --
> > XP-WNP
> > Today is the first day of the
> > rest of your life.
> >
> >
> > "
> > Chris Alvarado" wrote:
> >
> > > Hello,
> > > I have a situation that I would like to see if anyone else has had this
> > > particular problem...First the specifics, Intel P4 3.0, 1GB RAM, 200 GB HD,
> > > WinXP Pro. This motherboard did not have a parallel port natively. A PCI I/O
> > > port was added to provide parallel printing support. Printer: Epson LQ-590
> > > impact printer. Prints on LPT1. This printer prints from a DOS app and has
> > > a peculiar problem. The from that prints is 11" and after printing all the
> > > data on the form, the printer will halt for about 8-10 seconds, and not
> > > complete the remaining data on the last two inches of the form. After the
> > > 8-10 seconds are up, the printing will resume. All normal. Everything
> > > perfectly aligned, etc., etc. This happens on every form or report that we
> > > print. Things I have already done to try to correct the problem are,
> > > uninstall the driver and reinstall the driver using the latest from Epson.
> > > Microsoft's Knowledgebase had some things to try but ultimately that didn't
> > > work. If you have a possible idea, fix, try, anything, I will be grateful to
> > > try.
> > >
> > > Thanks,
> > >
> > > Chris Alvarado
> > >

Chris Alvarado
October 13th 05, 06:58 PM
Dear Byte,

With respect to point # 2, unless a network cable is inserted into the
Ethernet connection, the net use command returns an error with respect to
locating the computer name and printer. This is a single, stand-alone PC and
while it has an Ethernet connection, there is no network to plug into. Any
ideas?

Respectfully,

Chris


"Byte" wrote:

> Hope it works for you and happy putering. :~)
> --
> XP-WNP
> Today is the first day of the
> rest of your life.
>
>
> "
> Chris Alvarado" wrote:
>
> > Thanks Byte, I'll give those things a go.
> >
> > Chris
> >
> > "Byte" wrote:
> >
> > > Print From DOS with WindowsXP
> > > http://members.shaw.ca/bsanders/printfromdos.htm
> > > --
> > > XP-WNP
> > > Today is the first day of the
> > > rest of your life.
> > >
> > >
> > > "
> > > Chris Alvarado" wrote:
> > >
> > > > Hello,
> > > > I have a situation that I would like to see if anyone else has had this
> > > > particular problem...First the specifics, Intel P4 3.0, 1GB RAM, 200 GB HD,
> > > > WinXP Pro. This motherboard did not have a parallel port natively. A PCI I/O
> > > > port was added to provide parallel printing support. Printer: Epson LQ-590
> > > > impact printer. Prints on LPT1. This printer prints from a DOS app and has
> > > > a peculiar problem. The from that prints is 11" and after printing all the
> > > > data on the form, the printer will halt for about 8-10 seconds, and not
> > > > complete the remaining data on the last two inches of the form. After the
> > > > 8-10 seconds are up, the printing will resume. All normal. Everything
> > > > perfectly aligned, etc., etc. This happens on every form or report that we
> > > > print. Things I have already done to try to correct the problem are,
> > > > uninstall the driver and reinstall the driver using the latest from Epson.
> > > > Microsoft's Knowledgebase had some things to try but ultimately that didn't
> > > > work. If you have a possible idea, fix, try, anything, I will be grateful to
> > > > try.
> > > >
> > > > Thanks,
> > > >
> > > > Chris Alvarado
> > > >

Klaus Jorgensen
October 13th 05, 07:33 PM
" Chris Alvarado" > wrote in
message ...
>
> With respect to point # 2, unless a network cable is inserted into
> the
> Ethernet connection, the net use command returns an error with
> respect to
> locating the computer name and printer. This is a single,
> stand-alone PC and
> while it has an Ethernet connection, there is no network to plug
> into. Any
> ideas?
>

Why reroute if LPT1 is already available?

The problem you describe is very common when printing from DOS
applications under Windows. Windows grabs data being sent to physical
port LPT1, and feeds it to the printer spooler. When data is being
sent to a physical port, Windows does not know when the job is
finished, so it waits for additional data for a number of seconds
before flushing the spooler.
Often this problem can be solved if the DOS application supports
printing to a file called "LPT1" instead of a physical printer. When
the DOS application "closes" the file, Windows knows that no more data
will be created for the session, and flushes the spooler instantly.


/klaus

Davide Guolo
October 13th 05, 10:36 PM
Klaus,

> The problem you describe is very common when printing from DOS
> applications under Windows. Windows grabs data being sent to physical
> port LPT1, and feeds it to the printer spooler. When data is being
> sent to a physical port, Windows does not know when the job is
> finished, so it waits for additional data for a number of seconds
> before flushing the spooler.
> Often this problem can be solved if the DOS application supports
> printing to a file called "LPT1" instead of a physical printer. When
> the DOS application "closes" the file, Windows knows that no more data
> will be created for the session, and flushes the spooler instantly.

this is true, however sometimes is not possible to fix the DOS app.

In this situations you can solve the problem by tuning the LPT_Timeout XP
property.
One of the following 2 solution should do the trick:

1) Go to SYSTEM.INI file
in [386enh] section search [Network] if it does not exist enter
the following :

[Network]
PrintBufTime=10
[IFSMGR]
PrintBufTime=10

This should set the timeout to 10 seconds. Do not set too low the value
or the printer could start printing before the end of the DOS print job.

2) TAKE CARE using RegEdit: it could be rather dangerous.

In REGEDIT ( START->RUN-> REGEDIT )
click : Hkey_local_machine
then click : System
then click : CurrentControlSet
then click : Control
somewhere at the bottom of the control list Click: WOW
here you should find the LPT_timeout property

Kind regards,
Davide Guolo
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------

Chris Alvarado
October 14th 05, 06:44 PM
Klaus,

Thanks for your imput. The DOS app supports printing to LPT1 or 2 only. I
believe that hte app will print to "whatever" LPT1 or 2 is. I just don't
know if I can capture a file, as LPT1 or 2. The original problem that I have
is a delay during the print job. The printer is on a parallel port that is
LPT1. One thing we have thought about was using another local port and
capture it as LPT1.

Regards,

Chris Alvarado

"Klaus Jorgensen" wrote:

> " Chris Alvarado" > wrote in
> message ...
> >
> > With respect to point # 2, unless a network cable is inserted into
> > the
> > Ethernet connection, the net use command returns an error with
> > respect to
> > locating the computer name and printer. This is a single,
> > stand-alone PC and
> > while it has an Ethernet connection, there is no network to plug
> > into. Any
> > ideas?
> >
>
> Why reroute if LPT1 is already available?
>
> The problem you describe is very common when printing from DOS
> applications under Windows. Windows grabs data being sent to physical
> port LPT1, and feeds it to the printer spooler. When data is being
> sent to a physical port, Windows does not know when the job is
> finished, so it waits for additional data for a number of seconds
> before flushing the spooler.
> Often this problem can be solved if the DOS application supports
> printing to a file called "LPT1" instead of a physical printer. When
> the DOS application "closes" the file, Windows knows that no more data
> will be created for the session, and flushes the spooler instantly.
>
>
> /klaus
>
>
>
>

Klaus Jorgensen
October 15th 05, 09:35 AM
" Chris Alvarado" > wrote in
message ...
>
> Thanks for your imput. The DOS app supports printing to LPT1 or 2
> only. I
> believe that hte app will print to "whatever" LPT1 or 2 is. I just
> don't
> know if I can capture a file, as LPT1 or 2. The original problem
> that I have
> is a delay during the print job. The printer is on a parallel port
> that is
> LPT1. One thing we have thought about was using another local port
> and
> capture it as LPT1.
>

DOS apps are using three ways to print data:

1) Directly to the hardware
2) Via the BIOS
3) Via DOS

From your description, I think your DOS app is using 1) or 2) - most
likely 2) as this is the easiest one to use from a programmers point
of view.
WinXP grabs all of them, and only in 3) it truly knows when the print
job is complete. If your DOS app is using 1), there is not much you
can do other than what David suggested. I'm not sure about 2) as it
depends on how XP grabs BIOS calls, but it might be possible use a
utility to grab the BIOS calls and convert these to 3) whenever a form
feed code is found in the data stream - I'll try to dig into this.


/klaus

Klaus Jorgensen
October 18th 05, 06:54 PM
One addt'l question: If there is no LPT2 in your setup, what happens
if you set the app to print to LPT2?
If a file named LPT2 is created (probably in the app folder), the app
is already printing via DOS, and there is not much we can do.

If the app says the printer is not ready, try the attached program.
Place it in your DOS app folder, and change the shorcut used to run
the DOS app to:

cnvlpt dosapp.exe

....where "dosapp.exe" is the name of your DOS app executable.

The cnvlpt program will grab print commands [for LPT1 and LPT2] being
sent to the BIOS and reroute them to DOS. If a FormFeed code is found
in the data stream, the cnvlpt program tells DOS that printing is
complete. This should "tell" WinXP to flush remaining data in the
spooler.

Hope this is not too complicated...

/klaus

Klaus Jorgensen
October 18th 05, 07:32 PM
....ooops....

The newsgroup does not accept file attachments - if interested, please
let me know how to deliver the file. If posting your email address,
please use some kind of "coding" - i.e. "your.name (at) domain (dot)
com" or " so that spam harvesters gets confused.


/klaus

Jens R. Rasmussen
December 6th 05, 11:20 PM
Can you please tell me I shall place the file "LTP1" in order for WinXP to
grap it and starts printing? C:\LTP1 or C:\windows\ltp1 or ...?

Best regards
/Jens

"Davide Guolo" wrote:

> Klaus,
>
> > The problem you describe is very common when printing from DOS
> > applications under Windows. Windows grabs data being sent to physical
> > port LPT1, and feeds it to the printer spooler. When data is being
> > sent to a physical port, Windows does not know when the job is
> > finished, so it waits for additional data for a number of seconds
> > before flushing the spooler.
> > Often this problem can be solved if the DOS application supports
> > printing to a file called "LPT1" instead of a physical printer. When
> > the DOS application "closes" the file, Windows knows that no more data
> > will be created for the session, and flushes the spooler instantly.
>
> this is true, however sometimes is not possible to fix the DOS app.
>
> In this situations you can solve the problem by tuning the LPT_Timeout XP
> property.
> One of the following 2 solution should do the trick:
>
> 1) Go to SYSTEM.INI file
> in [386enh] section search [Network] if it does not exist enter
> the following :
>
> [Network]
> PrintBufTime=10
> [IFSMGR]
> PrintBufTime=10
>
> This should set the timeout to 10 seconds. Do not set too low the value
> or the printer could start printing before the end of the DOS print job.
>
> 2) TAKE CARE using RegEdit: it could be rather dangerous.
>
> In REGEDIT ( START->RUN-> REGEDIT )
> click : Hkey_local_machine
> then click : System
> then click : CurrentControlSet
> then click : Control
> somewhere at the bottom of the control list Click: WOW
> here you should find the LPT_timeout property
>
> Kind regards,
> Davide Guolo
> --------------------------------------------------------------
> Printfil - Windows Printing System for Applications
> http://www.printfil.com
> Odbc4All - Connection to ODBC Data Sources for any Application
> http://www.guolo.com/odbc4all
> --------------------------------------------------------------
>
>
>

Davide Guolo
December 12th 05, 02:06 AM
Jens,

> Can you please tell me I shall place the file "LTP1" in order for WinXP to
> grap it and starts printing? C:\LTP1 or C:\windows\ltp1 or ...?

sorry, I don't understand what is the LTP1 file supposed for.

If your question is somehow related to Printfil, please forward it to
support [at] printfil.com

Regards,
Davide.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------

Jens R. Rasmussen
December 12th 05, 08:06 AM
Hi Davide,

I read the following

"> > The problem you describe is very common when printing from DOS
> > applications under Windows. Windows grabs data being sent to physical
> > port LPT1, and feeds it to the printer spooler. When data is being
> > sent to a physical port, Windows does not know when the job is
> > finished, so it waits for additional data for a number of seconds
> > before flushing the spooler.
> > Often this problem can be solved if the DOS application supports
> > printing to a file called "LPT1" instead of a physical printer. When
> > the DOS application "closes" the file, Windows knows that no more data
> > will be created for the session, and flushes the spooler instantly.
>
"

and now I am asking: "Where skal I put the file LTP1 in order to solve the
problem"?

best regard Jens

"Davide Guolo" skrev:

> Jens,
>
> > Can you please tell me I shall place the file "LTP1" in order for WinXP to
> > grap it and starts printing? C:\LTP1 or C:\windows\ltp1 or ...?
>
> sorry, I don't understand what is the LTP1 file supposed for.
>
> If your question is somehow related to Printfil, please forward it to
> support [at] printfil.com
>
> Regards,
> Davide.
> --------------------------------------------------------------
> Printfil - Windows Printing System for Applications
> http://www.printfil.com
> Odbc4All - Connection to ODBC Data Sources for any Application
> http://www.guolo.com/odbc4all
> --------------------------------------------------------------
>
>
>

Davide Guolo
December 13th 05, 07:20 AM
Jens,

> I read the following
>
> > > Often this problem can be solved if the DOS application supports
> > > printing to a file called "LPT1" instead of a physical printer...
>
> and now I am asking: "Where skal I put the file LTP1 in order to solve the
> problem"?

The OP (Klaus Jorgensen) should answer your question, but I believe he was
referring to a DOS programming technique, rather than to simply put an ascii
file somewhere.

I misunderstood your question because Printfil does exactly this: you put an
ascii file somewhere on disk (or let Printfil capturing the LPT output) and
Printfil automatically redirects it to any Windows printer.

If you want to give it a try, you can find a free trial to download at our
web site.

Regards,
Davide.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------

Klaus Jorgensen
December 13th 05, 08:11 PM
Davide Guolo wrote :
> Jens,
>
>> I read the following
>>
>>>> Often this problem can be solved if the DOS application supports
>>>> printing to a file called "LPT1" instead of a physical printer...
>>
>> and now I am asking: "Where skal I put the file LTP1 in order to solve the
>> problem"?
>
> The OP (Klaus Jorgensen) should answer your question, but I believe he was
> referring to a DOS programming technique, rather than to simply put an ascii
> file somewhere.
>

No path, no drive letter, just tell the DOS app to print to a file
called LPT1. Well, it's actually a predefined device name and not a
file name.

(...or in plain Danish:
Drev og sti er ikke nødvendigt, og filen skal ikke laves i forvejen da
navnet faktisk indikerer en forud defineret enhed og ikke en fil.)


/klaus

Jens R. Rasmussen
December 13th 05, 10:58 PM
Thanks Klaus, I really owe you a beer. You have just solved a major problem
for me. Why isn't this solution highlighted anywhere?

best regard og tusind tak

/Jens


"Klaus Jorgensen" skrev:

> Davide Guolo wrote :
> > Jens,
> >
> >> I read the following
> >>
> >>>> Often this problem can be solved if the DOS application supports
> >>>> printing to a file called "LPT1" instead of a physical printer...
> >>
> >> and now I am asking: "Where skal I put the file LTP1 in order to solve the
> >> problem"?
> >
> > The OP (Klaus Jorgensen) should answer your question, but I believe he was
> > referring to a DOS programming technique, rather than to simply put an ascii
> > file somewhere.
> >
>
> No path, no drive letter, just tell the DOS app to print to a file
> called LPT1. Well, it's actually a predefined device name and not a
> file name.
>
> (...or in plain Danish:
> Drev og sti er ikke nødvendigt, og filen skal ikke laves i forvejen da
> navnet faktisk indikerer en forud defineret enhed og ikke en fil.)
>
>
> /klaus
>
>
>

Google