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

E

eL_NiNo

New Member
#1
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.
 
R

r_andrews

New Member
#2
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 :).

------------------
System:
ASUS P3B-F
PIII 550 MHz
256 MB PC-100 SDRAM
Guillemot 32 MB TNT2 Ultra
 
E

eL_NiNo

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

Tojij

New Member
#5
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.
 
E

eL_NiNo

New Member
#6
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...


Thanx
 
P

popol666

New Member
#7
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
 
butchsor

butchsor

New Member
#8
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.
 
E

eL_NiNo

New Member
#9
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
 
T

Tojij

New Member
#10
Suggestion:
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
 
E

eL_NiNo

New Member
#11
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
 
C

CALV

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

neildlb2

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

example:

dir c:\ /s > dirlist.txt

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

Tojij

New Member
#15
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..
 
SpywareDr

SpywareDr

New Member
#18
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