[Hi. I want to know if is it possible use a PC like a printer in order to get (or intercept) the data sent from a special machine. The situation is this: A client has a special device(Medical machine) and this device takes some measures from the patient and then sends the info to a laser printer (using PCL) through an USB port. This device doesn't have a SDK or native functionality to export or save the same info sent to the printer, so, I want to connect the device to a PC through the USB port and use the PC to read the data and save it to a file pdf, jpg, or any (with the same presentation or view as it is printed). Here is a picture to explain what i want.
-
https://stackoverflow.com/a/39641370/1778421 – Alex P. Jul 18 '17 at 02:13
1 Answers
The simplest solution may be to set up a new printer that simply prints to file, and direct the information from your USB cable to that virtual printer. You would need to be certain that the virtual printer has the same drivers as one of the printers your special device is able to print on.
You might also be able to use "netcat" to receive the document. Netcat allows your computer to listen for information on a specific port. In your specific case, you would want to use netcat to output the information from the special machine to a file on your PC. However, netcat requires being run from a command-line environment, such as Cygwin, which would require more programs to install on your computer.
Also, if the device is outputting pure PCL, you may be unable to determine what information your document contains, or even if it contains any information at all. There's a program (called PCLWorks) that has a demo that would allow you to view the printed output of files, and there are many programs that allow you to view contents of files (such as Notepad++).

- 1
- 1