July 1st, 2000, 06:17 PM
How to redirect a printer port (LPT) to a file ?
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.
July 1st, 2000, 08:41 PM
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
July 1st, 2000, 09:18 PM
Yeah, i may do that, but pretty hard in DOS mode ain't it ?
July 2nd, 2000, 12:17 AM
Please somebody, this is rather important =)
I appreciate any help, and thanx for all suggestions
July 2nd, 2000, 05:49 AM
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.
July 2nd, 2000, 11:23 AM
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...
July 2nd, 2000, 01:23 PM
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
July 2nd, 2000, 08:29 PM
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.
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.
Your browser sent a request that this server could not understand.
July 2nd, 2000, 11:44 PM
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
July 3rd, 2000, 04:07 AM
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
July 3rd, 2000, 10:59 AM
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
July 3rd, 2000, 01:49 PM
Hmm, I suppose you could always print it out then use an ocr program and scan it back
This sig In memory of my kid sister, Mandy. Died 14-8-02 aged 30.
Murdered for nothing at all by Louise Berry
July 3rd, 2000, 03:39 PM
Well, I guess i will find another way (300 pages or so is way too long to ocr)
July 4th, 2000, 06:34 AM
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...
July 4th, 2000, 09:19 PM
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..
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)