We help IT Professionals succeed at work.

Using DOS Copy Textfile to Printer with Win ME

MinnEE
MinnEE asked
on
I am helping a friend getting some existing software to run on her new Windows ME system.  It involves a DOS program that requires the printing of a multipage text file wherein the user gets the output by entering in the DOS window "Copy [Filename] PRN".

The printer only prints several blank pages.  The printer is a Canon BJC 7004 Plus. The computer system is called etower 600 TS. The printer settings show it is connected as the default printer to port LPT1.

I also tried "Copy Filename LPT1" with the same results.

How can I get the system to print the textfile using DOS keyed in commands?  

Thank You,

 

Comment
Watch Question

Commented:
Try printing a simple text file using that method.
If it fails, there's probably a problem with the printer settings.

Author

Commented:
The same file prints fine on other Windows 98 system.  Is this a ME problem?

I looked at the printer settings using the Windows control panel.  I could not see any that seemed to fit this problem.  Which one would cause this? The command I am using is a DOS command. Perhaps, the Windows control panel has no affect on this.  Maybe something in the config.sys or autoexec.bat is missing.

Author

Commented:
This is a simple 5 page text file. I can try a smaller one.
Which printer setting would do this?

Commented:
What happens if you try to print it from notepad?

Author

Commented:
To print from notepad, manual intervention is required to set the page margins and font size and font type to fit the required width of characters on each line. The file uses Couried font to maintain columjn allignment.  The file also has some escape code that starts a new page and adds page numbers. I am not looking for a "work around".

At this time I have written and complied a small QBasic program that reads the text file one line at a time and sends it to the printer using the LPrint command. This works on my Windows 98 system and I have yet to try it out on Windows ME.  If that doesn't work I will write a small VB program to do a similiar thing. Here I can have the extra control of font, page numbering, etc. My objective is to make the present DOS program work with the least amount of change to the user and the related files, without rewriting an entire new app.

But I am still wondering: Is there a way for Windows ME to use the DOS "Copy Filename LPT1" as other versions of Windows did.

Perhaps this question should be posted in the printer section. I just remebered that in my HP Windows 98 system I was told how to make some changes in the System Bios to get DOS printing to work OK. I had to change the parallel port option to ECP from bidirectional.  Perhaps this is manufacturer dependent.

Commented:
> I am not looking for a "work around".

In order to find the cause of the problem, I need to know all the symptoms.  Right now I'm looking for causes, not yet offering solutions.

What happens if you load the file in notepad and try to print it?

Author

Commented:

Author

Commented:
It prints thru Notepad, except the lines wrap around unless the printer margins are increased or the font size reduced.  The few escape codes used (for page numbers and formfeed) don't do anything but print out. This would be expected.

Author

Commented:
Another sympton of the problem is that when using the DOS Editor (edit.com), the Editor print function does not work for a loaded text file.

Commented:
I don't have WinMe but isn't there a setting in the printer properties that says something like "capture DOS printer"?

Author

Commented:
I don't have windows ME either. The person I am trying to help lives in a different city.  I may be able to get the use of one locally.  I was hopefully trying to get someone who knows if this is a basic problem with Windows ME or just this manufacturer or the setup.  It is hard for me to contact the manufacturer since I can't run the system while on the phone. Microsoft would probably say to talk to the system manufacturer.  I now plan to make a small VB program to print the simple text file. It will able to be used from the DOS prompt and need not show anything.  Just do the job and close itself.  Something like PRT Filename.  I need fixed spaced font so the VB program will select one such as Courier New and adjust the font size so that the lines fit on the page.   The printer will respond to Chr$(13) + Chr$(10) for a new line, but not Chr$(12)(formfeed) so I will have to look for those and call for a newpage.

Author

Commented:
I just tried DOS printing with another Windows ME system, and it worked OK. This was a fairly lost cost HP system.  I could print from both the DOS editor and from the DOS prompt "Copy filename prn" or "Copy filename LPT1".  The system that did not print this way was from a different manufacturer.  So this is not a basic problem with Windows ME.  It may be a problem with Windows NT and 3000.  

So I would like to close this question out, Since I found out part of the answer by myself.  "Yes, it is possible for a system with Windows ME to print using DOS commands as well as the DOS Editor.  It would be nice if the question would show up as "previously" asked.

Commented:
kill it

Commented:
Doh!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.