Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to capture data sent to a printer

Status
Not open for further replies.

rianeiromiron

Programmer
Jul 1, 2001
151
GT
Hi all:

I'm in the need to capture data sent to a printer, via parallel port, (not USB); the cable won't be connected to the printer, but instead to the capturing PC; once the data is captured i need to save it as a binary file.

Any ideas??? Kind of lost here.

Thanks to all.
 
Look at the syntax of REPORT FORM. You can send your report to a file, copy to a floppy and transport to the second computer. This report is in text format capable of being viewed by Notepad.

What do you mean by a binary file and why do you need it?
 
Rmijron,

If your capture device is attached to the printer port, just "print" the report in the normal way. Provided you are using a printer driver that is configured for the same parallel port, it should work. (Provided also, of course, that the capture device is capable of receiving the data being sent via the port.)

The only thing I'm not sure about is what you mean by "binary file". The data will consist of the print codes and the text that is actually sent to the printer. This might include font images and other printer data. Is that what you want?

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Alternatively, the Windows Printer driver is able to send the print jobs "to file". set this to be the default by going to [ start menu -> settings --> printers ] right click your disconnected printer, choose properties, then browse through the properties pages to find the "Print to File" setting.

The file that produces is unreadableby anything other than the printer it is designed for, but you can then "COPY printresults.prm LPT1" to send that job to the printer.
 
Thank you all for your responses.
Perhaps I didn't explain well what I needed. I DO NOT need to print the file, but instead, CAPTURE what it is been printed. Computer A prints whatever is needed to be printed (in fact, it is a graphic with say, a logo, or any picture, for example). Computer B is attached to the other end of the cable (something like if comp. B was the printer) and needs to intercept the data sent through the cable. So, what I need to do is READ from the cable directly, and then, save this data completely to a file. My main question here, is how to read the data from the cable. I have found some ActiveX controls on the internet but haven't been able to access the data at all.

Thank you all, any further help would greatly be appreciated.

(BTW, wgcs, you have a point with your approach, thanks)
 
Rmiron,

I understand what you are trying to do, but I don't understand why. It seems that you want the print stream (the data that would otherwise be sent to the printer) to end up in the storage of the other computer. Wouldn't it be much simpler to print the report to a file, and to copy that file to the other computer?

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top