How to intercept data being sent to a printer?

4.5k views Asked by At

I'm interfacing with an application that's sending a raw printer file to the default printer. This is the only thing it will do with the data.

I need to get this file somehow so I can store it elsewhere instead. What would be the best way to do this?

The best I've thought of is to write an app that listens to a specific port, and set the default printer to that port.

Would this way work? Is there a better way?

1

There are 1 answers

0
William W On BEST ANSWER

I ran across and LDP implementation for Java that I'm going to modify and use. You can access it as a printer and then do what you want with the raw files.

http://lpdspooler.sourceforge.net/