How to redirect a printer port (LPT) to a file ?



New Member
Hi everyone !

I'm looking forward for advice for this situation :
I want to make a text file out of a document i want to print so All i would do is when using the printer it would write into a text file instead.

Thanx for advice...
Btw the applications i want to print from is in DOS.


New Member
Try putting a check in the box for the option that says "print to file." I've never had any use for this option and I don't know what it does, but it might just work :).

PIII 550 MHz
256 MB PC-100 SDRAM
Guillemot 32 MB TNT2 Ultra


New Member
Please somebody, this is rather important =)
I appreciate any help, and thanx for all suggestions


New Member
What application are you printing from? Most programs use a binary format for printing through LPT1 to add formatting, (bold text, underline, etc). We need to check if the program you are using can output in text format first.


New Member
Actually it's an old application (about 10 years old, so probably made in cobol ) that contains a database of customers.

This database can be printed in a kind of report to the printer, but it's 300 pages so if i could get it to a file, i could easily create a database...
I'm looking forward for something like this :
"Set printer = c:\text.txt" <- Although I doubt this i spossible...So all dos application would automatically redirect its printer content to text...



New Member
if you'r in pure dos you should check in help
i am not sure it is possible but you'l find the answer there(i dont have dos machine near to search)it should be a "mode" comand
if dos application is runing under windows you should be able to do it by the mark said upper


New Member
Set your printer set-up from LPt1 to "File" and save it as default ( you can also add 2nd same printer with print to file odtion) example. Hp850c connected to lpt1 and copy of HP850c connected to file.

When you send any prog docs/graphic/lay-out files, it will ask you a file name. Type any filename you want with an extension of prn.
example: butch.prn

At DOS prompt:
c:\>copy butch.prn /b lpt1

/b means binary format

you don't need to type /b when using DOS version 7 and above.

on WINdows DOS prompt:
c:\>copy butch.prn lpt1

goodluck! and feel free to post again here if still have problems with this.


New Member
Well actually, changing from lpt to FILE is great...but it saves data in binary format, what i would like to be able to do is actually save the text content of what should be printed on sheets if it was not saved to file...

Is there a way to do it, so i could get a good ol' test.txt with text in this file...?

Thanx for advice and sorry for my bad english, doin' my best here


New Member
1. Install Adobe Acrobat PDFwriter and set it up to capture LPT1
2. Print to a PDF file
3. Get an OCR program to convert the PDF's to text.

You could also try to use a print to JPEG program such as Hijaak to produce JPEGs. You could then use the OCR software to recognize the text.

By the way, what file extension does the file have? Maybe you could open it in Excel or Access. It wouldn't hurt to try


New Member
Well, actually,

It is a custom made program so it's not a file;

It's an old DOS application not a particular file...So everything is create within the application itself and preinted on the printer (This is an enterprise prog)...
So i don't know about capturing with adobre acrobat since it's dos...

Well seem like it's a dead-end :p


New Member
Hmm, I suppose you could always print it out then use an ocr program and scan it back


New Member
how do you run the program ? i remember being able to redirect the output of dos commands to a file:


dir c:\ /s > dirlist.txt

which will send the dir output to the file instead of the display...


New Member
Question: When you print it, does it have any formatting on it (Bold text, Underlines, graphics)? If there are, and the program does not give you any other way to give an output, then your out of luck

By the way, could you run it on a DOS window? If you could, could you post a screenshot (press ALT-PRTSCR and save as a file in Photo Editor)? Maybe somebody would recognize it and give suggestions..


Right? That's clear back when bread was 93 cents a loaf, gasoline was $1.57 a gallon, a-n-d, I still had all my hair. :D