Computing.Net > Forums > Disk Operating System > dos printing to file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

dos printing to file

Reply to Message Icon

Name: Chris
Date: September 10, 2002 at 11:40:39 Pacific
OS: win98
CPU/Ram: celeron/PII 128MB
Comment:

I have a DOS program that will ONLY print to LPT1. I need to be able to take print output into a file (it will be plain text and numbers). I have tried programs like prn2file and lpttofl but they don't work.
Does anybody know anything else I can try to get this to work?




Sponsored Link
Ads by Google

Response Number 1
Name: fred6008
Date: September 10, 2002 at 20:49:25 Pacific
Reply:

You are confusing terms here. What you print is a file. Print a file to a file would make no sense. If you are trying to print from an application, the print command in the applidation will determine what you have to do.


0

Response Number 2
Name: Jem
Date: September 10, 2002 at 21:16:43 Pacific
Reply:

I had a similar problem.

Do you specifically require an output to file (.prn file) or are you trying to find a way to print from a DOS app on a Windows only printer?

I've tried prn2file and I can't get it to work on my Win ME system in any form but I can get it to work using a Win 98 boot disk. Unfortunately I don't have a loaded 98 system to try it through Windows 98 itself.

If your DOS app has the ability to save files in ASCII format you could then save them as .txt files and load them into Windows Notepad. You can temporarily set your Windows printer to print to file by going to Control Panel...Printers...(single click on default printer)...File...Properties...Details tab and select 'File' in the 'Print to the following port' window.

When you select 'print' it will then be printed to a file.

There is a freeware utility called Printfile
http://www.lerup.com/printfile/
which you can use to 'drag and drop' .prn files for actual printing.

If you don't specifically require a .prn file you can save your DOS app documents in ASCII format giving them a .prn extension, (for example letter.prn) they will then show up as Printfile documents (icons) and double clicking on them will send them to the printer.

Rather long winded but I'm not sure what you're trying to achieve.


0

Response Number 3
Name: tech-fred
Date: September 11, 2002 at 04:46:40 Pacific
Reply:

prn2file and lpttofl need to run in dos
because they capture the data stream to lpt1.

They do not work in the DOS box, because
windows handles the print stream differently.

You might try installing a Generic Text
Printer and set its destination to file and
make it default. This works sometimes.

Remember booting DOS should always work.


0

Response Number 4
Name: Chris
Date: September 11, 2002 at 07:42:30 Pacific
Reply:

The program I use is a rather inflexible program that prints reports. It does have a handy option that allows us to export certain reports onto a file, but this isn't always available or practical (e.g. a report may be several hundred pages and we only need a few pages exported to a text file to be edited and then imported into a spreadsheet).

This program (Merrimac publishing, in case anybody out there is familiar with it)requires networking and has many users accessing it so using pure dos isn't very practical. Its print command only prints to LPT1; there is no option to change it. I can capture a network printer (net use lpt1: \\etc.) and print to network printers with no problem but I need to instead be able to send the print output to a file. Novell has a handy way to capture to file printing, but MS doesn't.

I'm going to try prn2file again on a win98 machine but if it only works in pure dos, it won't be practical to use it in my situation.

I hope this other info helps to clarify my problem.


0

Response Number 5
Name: Chris
Date: September 11, 2002 at 08:29:05 Pacific
Reply:

Tech-fred,

regarding a generic printer directed to print to file: I actually tried something like this with no luck:

Setup a generic text printer on machine A set to print to file. Shared it.

On machine B, captured A's shared printer to LPT1 with net use command.

Printed something on machine B.

----
This didn't work and the program could not find the printer.


0

Related Posts

See More



Response Number 6
Name: Svend Broholm
Date: September 11, 2002 at 10:06:22 Pacific
Reply:


I have read Chris's request. I would have expected PRN2FILE.COM would have solved the problem if he could accept using DOS (This is a DOS forum!).
I will not let you down, so an other way might be using the TSR-program SNIPPER.COM. I expect you are able to view the output file in textmode (80*25) before you actually print it to a printer. Then pressing the hotkey let you shade a rectangular area of the screen (=outputfile) which may be saved to file or outputt'ed to a printer.
Works perfect in pure DOS and in a DOS-box under NT4.
Hope this helps you
Svend


0

Response Number 7
Name: Chris
Date: September 11, 2002 at 10:18:57 Pacific
Reply:

Svend,

Actually, I would have no problem using dos. But unfortunately, the other users only know win98 and they would have serious issues with it. Telling them to restart in DOS mode everytime they wanted to do this would be too much for them. So unfortunately, the solution will have to be one that works in the dos box in win98/2000/XP.

The output file, unfortunately, cannot be previewed in anyway. The program, Merrimac, generates the report to be printed internally and there is no way to access or view the output beforehand.


0

Response Number 8
Name: tech-fred
Date: September 11, 2002 at 16:43:26 Pacific
Reply:

I have a far out solution.
Capture Data Stream out of LPT Port
Use Parallel To Serial Adapter
Input Serial Data (The Print Job Into Another
Computer through its serial port.

Or If you can map LPT1 to a serial port of
your print server, use that port for output
to another computer.

Have done that before long ago.
Problem is to have a program capture the
output untended unless you're willing to
search through a giant text file.


0

Response Number 9
Name: Chris
Date: September 11, 2002 at 17:48:44 Pacific
Reply:

Tech-fred,

wow, now that's a crazy solution. Actually, I got prn2file working perfectly in DOS. I setup an antique pc (486sx, 4MB RAM) with MS network client for DOS and this system does it perfectly. I'll probably just add this pc to the network and have the users use it only when they need to capture printing to a file (which fortunately isn't too often)


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: dos printing to file

dos print to a file www.computing.net/answers/dos/dos-print-to-a-file/1263.html

print to file www.computing.net/answers/dos/print-to-file/620.html

DOS Print to File www.computing.net/answers/dos/dos-print-to-file/9514.html