I would like to create a virtual printer using Java, so that when you go to print a file( using Word or something) the Java printer is listed as a valid printer. My goal is to get the printer formatted object that the programs (Word, etc..) send directly to the printer. I don't know if this is possible. It seemed like a more logical solution to this question:
Printing multiple file types using java
Any ideas? I heard this is only possible using C or C++, but I don't know for sure.
There is a LPD implementation available in Java. You can then create manually a printer in Windows which use the LPR protocol to print to said Java LPD. This captures the result as a byte stream which you can then manipulate further.
You will have to write a new printer driver that re-direct API calls to your Java classes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With